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
@@ -89,7 +89,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
)
|
||||
|
||||
|
||||
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):
|
||||
"""Set up the Modbus sensors."""
|
||||
sensors = []
|
||||
data_types = {DATA_TYPE_INT: {1: "h", 2: "i", 4: "q"}}
|
||||
@@ -148,7 +148,7 @@ async def async_setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
|
||||
if not sensors:
|
||||
return False
|
||||
add_entities(sensors)
|
||||
async_add_entities(sensors)
|
||||
|
||||
|
||||
class ModbusRegisterSensor(RestoreEntity):
|
||||
|
||||
Reference in new issue
Block a user