Reset Modbus value on down (#86127)
* modbus: slave should reset value on sensor down as parent does that * modbus: slave should reset value on sensor down as parent does that
This commit is contained in:
parent
0b45fb6dc3
commit
9d9817328b
2 changed files with 2 additions and 4 deletions
|
@ -156,6 +156,5 @@ class SlaveSensor(
|
|||
def _handle_coordinator_update(self) -> None:
|
||||
"""Handle updated data from the coordinator."""
|
||||
result = self.coordinator.data
|
||||
if result:
|
||||
self._attr_native_value = result[self._idx]
|
||||
self._attr_native_value = result[self._idx] if result else None
|
||||
super()._handle_coordinator_update()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue