mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Rftrx force update (#37944)
* Make sure sensor and binary_sensor force update This make sure it's possible to react to events on all updates. * Correct addition of binary sensors
This commit is contained in:
@@ -178,6 +178,16 @@ class RfxtrxSensor(RestoreEntity):
|
||||
"""Return the unit this state is expressed in."""
|
||||
return self._unit_of_measurement
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def force_update(self) -> bool:
|
||||
"""We should force updates. Repeated states have meaning."""
|
||||
return True
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return a device class for sensor."""
|
||||
|
||||
Reference in New Issue
Block a user