mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
After merge, review. (#51139)
This commit is contained in:
@@ -52,8 +52,7 @@ async def async_setup_platform(
|
||||
hub = hass.data[MODBUS_DOMAIN][discovery_info[CONF_NAME]]
|
||||
sensors.append(ModbusRegisterSensor(hub, entry))
|
||||
|
||||
if len(sensors) > 0:
|
||||
async_add_entities(sensors)
|
||||
async_add_entities(sensors)
|
||||
|
||||
|
||||
class ModbusRegisterSensor(BasePlatform, RestoreEntity, SensorEntity):
|
||||
|
@@ -210,7 +210,7 @@ async def test_config_wrong_struct_sensor(
|
||||
expect_setup_to_fail=True,
|
||||
)
|
||||
|
||||
assert error_message in "".join(caplog.messages)
|
||||
assert error_message in caplog.text
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
Reference in New Issue
Block a user