diff --git a/custom_components/aquarea/sensor.py b/custom_components/aquarea/sensor.py index bb8ef80..4901ec3 100644 --- a/custom_components/aquarea/sensor.py +++ b/custom_components/aquarea/sensor.py @@ -20,7 +20,14 @@ CONF_DEVICE_CLASS, CONF_UNIT_OF_MEASUREMENT, ) -from homeassistant.helpers.trigger_template_entity import CONF_AVAILABILITY +_LOGGER = logging.getLogger(__name__) +try: + from homeassistant.helpers.trigger_template_entity import CONF_AVAILABILITY +except: + # TODO(kamaradclimber): remove this once we stop support 2023.8 and below + _LOGGER.warn("backward compatibility mode: please update to HA 2023.9 eventually") + from homeassistant.helpers.template_entity import CONF_AVAILABILITY + from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -30,7 +37,6 @@ from .definitions import build_sensors, HeishaMonSensorEntityDescription from . import build_device_info -_LOGGER = logging.getLogger(__name__) # async_setup_platform should be defined if one wants to support config via configuration.yaml diff --git a/hacs.json b/hacs.json index 7fa7a9a..e3159c0 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "HeishaMon", "render_readme": true, - "homeassistant": "2023.9.0" + "homeassistant": "2023.2" }