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:
jan iversen authored and GitHub committed 2020-04-07 16:56:48 +02:00
1 parent c19a1bf26d
commit b3286a4a01
6 files changed
+16 -26

No files matched your search

+2 -2
View File
@@ -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):