Skip to content

Commit

Permalink
removed async sensor, since underlying pysensorpush does not support …
Browse files Browse the repository at this point in the history
…asynch operations
  • Loading branch information
rsnodgrass committed Jun 4, 2020
1 parent 428b934 commit 852faca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/sensorpush/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand All @@ -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)}")
Expand All @@ -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):
Expand Down

0 comments on commit 852faca

Please sign in to comment.