Skip to content

Commit

Permalink
Solve switch/verify register type convert problem in modbus (#54645)
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Aug 16, 2021
1 parent b2f73b3 commit bec42b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/modbus/base_platform.py
Expand Up @@ -187,9 +187,9 @@ def __init__(self, hub: ModbusHub, config: dict) -> None:
self._verify_address = config[CONF_VERIFY].get(
CONF_ADDRESS, config[CONF_ADDRESS]
)
self._verify_type = config[CONF_VERIFY].get(
CONF_INPUT_TYPE, convert[config[CONF_WRITE_TYPE]][0]
)
self._verify_type = convert[
config[CONF_VERIFY].get(CONF_INPUT_TYPE, config[CONF_WRITE_TYPE])
][0]
self._state_on = config[CONF_VERIFY].get(CONF_STATE_ON, self.command_on)
self._state_off = config[CONF_VERIFY].get(CONF_STATE_OFF, self._command_off)
else:
Expand Down

0 comments on commit bec42b7

Please sign in to comment.