diff --git a/homeassistant/components/brother/sensor.py b/homeassistant/components/brother/sensor.py index 873e734b1d6..dda4231dd30 100644 --- a/homeassistant/components/brother/sensor.py +++ b/homeassistant/components/brother/sensor.py @@ -17,7 +17,7 @@ from homeassistant.components.sensor import ( SensorStateClass, ) from homeassistant.const import PERCENTAGE, EntityCategory -from homeassistant.core import HomeAssistant, callback +from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from homeassistant.helpers.typing import StateType @@ -345,12 +345,10 @@ class BrotherPrinterSensor(BrotherPrinterEntity, SensorEntity): """Initialize.""" super().__init__(coordinator) - self._attr_native_value = description.value(coordinator.data) self._attr_unique_id = f"{coordinator.brother.serial.lower()}_{description.key}" self.entity_description = description - @callback - def _handle_coordinator_update(self) -> None: - """Handle updated data from the coordinator.""" - self._attr_native_value = self.entity_description.value(self.coordinator.data) - self.async_write_ha_state() + @property + def native_value(self) -> StateType | datetime: + """Return the native value of the sensor.""" + return self.entity_description.value(self.coordinator.data)