mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 04:05:20 +01:00
Move temperature conversions to sensor base class (4/8) (#54472)
* Move temperature conversions to entity base class (4/8) * Fix litterrobot sensor * Fix tests
This commit is contained in:
@@ -50,7 +50,7 @@ class JewishCalendarSensor(SensorEntity):
|
||||
self._holiday_attrs = {}
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
def native_value(self):
|
||||
"""Return the state of the sensor."""
|
||||
if isinstance(self._state, datetime):
|
||||
return self._state.isoformat()
|
||||
@@ -134,7 +134,7 @@ class JewishCalendarTimeSensor(JewishCalendarSensor):
|
||||
_attr_device_class = DEVICE_CLASS_TIMESTAMP
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
def native_value(self):
|
||||
"""Return the state of the sensor."""
|
||||
if self._state is None:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user