mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Correct modbus switch to return correct coil (#40190)
This commit is contained in:
parent
5832184304
commit
9bd28306f6
@ -171,7 +171,7 @@ class ModbusCoilSwitch(ToggleEntity, RestoreEntity):
|
||||
return
|
||||
|
||||
self._available = True
|
||||
return bool(result.bits[0])
|
||||
return bool(result.bits[coil])
|
||||
|
||||
def _write_coil(self, coil, value):
|
||||
"""Write coil using the Modbus hub slave."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user