Skip to content

Commit

Permalink
⬇ Restore backward compatibility
Browse files Browse the repository at this point in the history
Partial revert of 3ed7aca

Fixes #105
  • Loading branch information
kamaradclimber committed Sep 9, 2023
1 parent a2bf4ab commit f8d0507
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions custom_components/aquarea/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "HeishaMon",
"render_readme": true,
"homeassistant": "2023.9.0"
"homeassistant": "2023.2"
}

0 comments on commit f8d0507

Please sign in to comment.