Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion homeassistant/components/modbus/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ def write_coil(service):
address = service.data[ATTR_ADDRESS]
state = service.data[ATTR_STATE]
client_name = service.data[ATTR_HUB]
hub_collect[client_name].write_coil(unit, address, state)
if isinstance(state, list):
Comment thread
janiversen marked this conversation as resolved.
hub_collect[client_name].write_coils(unit, address, state)
else:
hub_collect[client_name].write_coil(unit, address, state)

# register function to gracefully stop modbus
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_modbus)
Expand Down