From 9bff129480055f573c769b62d31cd4958ae17286 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Sat, 18 Nov 2023 21:47:12 +0000 Subject: [PATCH] feedback --- homeassistant/components/time_date/sensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/time_date/sensor.py b/homeassistant/components/time_date/sensor.py index 5bdf91a5bca27..95a3158901f3e 100644 --- a/homeassistant/components/time_date/sensor.py +++ b/homeassistant/components/time_date/sensor.py @@ -83,14 +83,13 @@ class TimeDateSensor(SensorEntity): """Implementation of a Time and Date sensor.""" _attr_has_entity_name = True + _state: str | None = None + unsub: Callable[[], None] | None = None def __init__(self, option_type: str, entry_id: str) -> None: """Initialize the sensor.""" self._attr_translation_key = option_type self.type = option_type - self._state: str | None = None - self.unsub: Callable[[], None] | None = None - self.entity_id = ENTITY_ID_FORMAT.format(option_type) self._attr_unique_id = f"{option_type}_{entry_id}" self._attr_device_info = DeviceInfo(