custom-components / pyscript

Pyscript adds rich Python scripting to HASS
Apache License 2.0
894 stars 47 forks source link

pyscript accesses hass.components.hassio deprecation notice #630

Closed ALERTua closed 2 months ago

ALERTua commented 2 months ago
2024-08-30 15:57:47.595 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'pyscript' accesses hass.components.hassio. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from hassio directly at custom_components/pyscript/eval.py, line 1571: return getattr(val, arg.attr), please create a bug report at https://github.com/custom-components/pyscript/issues
craigbarratt commented 2 months ago

I don't think pyscript uses hass.components.hassio. Is it something yourpyscript code accesses?

ALERTua commented 2 months ago

woops, it does.

class HA:
    def __init__(self):
        self.data = hass.data
        self.config = hass.config
        self.host_info = hass.components.hassio.get_host_info()
        self.info = hass.components.hassio.get_info()

sorry