Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬇ Restore backward compatibility #108

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
Loading