diff --git a/custom_components/sensorpush/sensor.py b/custom_components/sensorpush/sensor.py index c1dfaf4..9a0594e 100644 --- a/custom_components/sensorpush/sensor.py +++ b/custom_components/sensorpush/sensor.py @@ -25,7 +25,7 @@ ) # pylint: disable=unused-argument -async def async_setup_platform(hass, config, async_add_entities_callback, discovery_info=None): +def setup_platform(hass, config, add_entities_callback, discovery_info=None): #def setup_platform(hass, config, add_entities_callback, discovery_info=None): """Setup the SensorPush sensor""" @@ -41,8 +41,6 @@ async def async_setup_platform(hass, config, async_add_entities_callback, discov # if conf.get(CONF_UNIT_SYSTEM) == UNIT_SYSTEM_METRIC: # unit_system = UNIT_SYSTEM_METRIC - LOG.debug(f"Setting up SensorPush sensors: {sensorpush_service.sensors}") - hass_sensors = [] for sensor_info in sensorpush_service.sensors.values(): LOG.info(f"SensorInfo: {sensor_info} -- {type(sensor_info)}") @@ -56,7 +54,7 @@ async def async_setup_platform(hass, config, async_add_entities_callback, discov hass_sensors.append( SensorPushHumidity(hass, conf, sensor_info, unit_system)) # execute callback to add new entities - async_add_entities_callback(hass_sensors, True) + add_entities_callback(hass_sensors, True) # pylint: disable=too-many-instance-attributes class SensorPushHumidity(SensorPushEntity):