diff --git a/custom_components/google_home/sensor.py b/custom_components/google_home/sensor.py index b7220596..df3729c0 100644 --- a/custom_components/google_home/sensor.py +++ b/custom_components/google_home/sensor.py @@ -8,7 +8,6 @@ from homeassistant.components.sensor import SensorDeviceClass from homeassistant.config_entries import ConfigEntry -from homeassistant.const import STATE_UNAVAILABLE from homeassistant.core import HomeAssistant, ServiceCall from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.helpers.entity import Entity, EntityCategory @@ -202,7 +201,7 @@ def state(self) -> str | None: if next_alarm and next_alarm.status not in (GoogleHomeAlarmStatus.INACTIVE, GoogleHomeAlarmStatus.MISSED) - else STATE_UNAVAILABLE + else None ) @property @@ -282,11 +281,7 @@ def state(self) -> str | None: if not device: return None timer = device.get_next_timer() - return ( - timer.local_time_iso - if timer and timer.local_time_iso - else STATE_UNAVAILABLE - ) + return timer.local_time_iso if timer and timer.local_time_iso else None @property def extra_state_attributes(self) -> TimersAttributes: