Fix Modbus review comments (#33755)
* update common test for modbus integration * remove log messages from modbus setup function. * Make global method local * Change parameter name to snake_case
This commit is contained in:
1 parent
c19a1bf26d
commit
b3286a4a01
6 files changed
+16
-26
No files matched your search
@@ -76,7 +76,7 @@ PLATFORM_SCHEMA = vol.All(
|
||||
)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Read configuration and create Modbus devices."""
|
||||
switches = []
|
||||
if CONF_COILS in config:
|
||||
@@ -109,7 +109,7 @@ async def async_setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
)
|
||||
)
|
||||
|
||||
add_entities(switches)
|
||||
async_add_entities(switches)
|
||||
|
||||
|
||||
class ModbusCoilSwitch(ToggleEntity, RestoreEntity):
|
||||
|
||||
Reference in new issue
Block a user