After merge, review. (#51139)

This commit is contained in:
jan iversen 2021-05-27 08:28:31 +02:00 committed by GitHub
parent fdfb84e8e2
commit 8d365e8bf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -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):