diff --git a/custom_components/teslemetry/binary_sensor.py b/custom_components/teslemetry/binary_sensor.py index 3b15e33..1981743 100644 --- a/custom_components/teslemetry/binary_sensor.py +++ b/custom_components/teslemetry/binary_sensor.py @@ -302,7 +302,7 @@ async def async_added_to_hass(self) -> None: """Handle entity which will be added.""" await super().async_added_to_hass() if (state := await self.async_get_last_state()) is not None: - self._state = state.state == "on" + self._attr_is_on = state.state == "on" def _async_update_attrs(self) -> None: """Update the attributes of the binary sensor."""