diff --git a/custom_components/car_wash/binary_sensor.py b/custom_components/car_wash/binary_sensor.py index 8d632b4..4ac4533 100644 --- a/custom_components/car_wash/binary_sensor.py +++ b/custom_components/car_wash/binary_sensor.py @@ -34,10 +34,10 @@ EVENT_HOMEASSISTANT_START, UnitOfTemperature, ) -from homeassistant.core import HomeAssistant, callback +from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import config_validation as cv -from homeassistant.helpers.event import async_track_state_change +from homeassistant.helpers.event import async_track_state_change_event from homeassistant.helpers.typing import ConfigType from homeassistant.util import dt as dt_util from homeassistant.util.unit_conversion import TemperatureConverter @@ -119,20 +119,20 @@ def available(self) -> bool: """Return True if entity is available.""" return self._attr_is_on is not None - async def async_added_to_hass(self): + async def async_added_to_hass(self) -> None: """Register callbacks.""" # pylint: disable=unused-argument @callback - def sensor_state_listener(entity, old_state, new_state): + def sensor_state_listener(event: Event[EventStateChangedData]) -> None: """Handle device state changes.""" self.async_schedule_update_ha_state(True) # pylint: disable=unused-argument @callback - def sensor_startup(event): + def sensor_startup(event) -> None: """Update template on startup.""" - async_track_state_change( + async_track_state_change_event( self.hass, [self._weather_entity], sensor_state_listener ) diff --git a/custom_components/car_wash/const.py b/custom_components/car_wash/const.py index e3a1a50..633ef0b 100644 --- a/custom_components/car_wash/const.py +++ b/custom_components/car_wash/const.py @@ -21,7 +21,7 @@ # Base component constants NAME: Final = "Car Wash" DOMAIN: Final = "car_wash" -VERSION: Final = "1.5.6" +VERSION: Final = "1.5.7-alpha" ISSUE_URL: Final = "https://github.com/Limych/ha-car_wash/issues" STARTUP_MESSAGE: Final = f""" diff --git a/custom_components/car_wash/manifest.json b/custom_components/car_wash/manifest.json index dffc641..665e263 100644 --- a/custom_components/car_wash/manifest.json +++ b/custom_components/car_wash/manifest.json @@ -12,5 +12,5 @@ "iot_class": "calculated", "issue_tracker": "https://github.com/Limych/ha-car_wash/issues", "requirements": [], - "version": "1.5.6" + "version": "1.5.7-alpha" } \ No newline at end of file