Correct modbus switch to return correct coil (#40190)
This commit is contained in:
1 parent
5832184304
commit
9bd28306f6
1 file changed
+1
-1
@@ -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."""
|
||||
|
||||
Reference in new issue
Block a user