Skip to content

Commit

Permalink
revert to 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnodgrass committed Nov 13, 2019
1 parent 32073c9 commit 536ec26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions custom_components/sensorpush/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ def __init__(self, hass, config, sensor_info, unit_system, field_name):
if not self._name:
self._name = f"SensorPush {sensor_info.get('name')}"

# force state to be updated on creation
self._update_callback()

@property
def name(self):
"""Return the display name for this sensor"""
Expand Down Expand Up @@ -175,4 +172,4 @@ def _update_callback(self):
LOG.info(f"Updated {self._name} to {self._state} {self.unit_of_measurement} : {latest_result}")

# let Home Assistant know that SensorPush data for this entity has been updated
self.async_schedule_update_ha_state()
self.async_schedule_update_ha_state()
2 changes: 2 additions & 0 deletions custom_components/sensorpush/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class SensorPushHumidity(SensorPushEntity):

def __init__(self, hass, config, sensor_info, unit_system):
self._name = f"{sensor_info.get('name')} Humidity"
self._state = 0.0
super().__init__(hass, config, sensor_info, unit_system, 'humidity')

@property
Expand All @@ -81,6 +82,7 @@ class SensorPushTemperature(SensorPushEntity):

def __init__(self, hass, config, sensor_info, unit_system):
self._name = f"{sensor_info.get('name')} Temperature"
self._state = 0.0
super().__init__(hass, config, sensor_info, unit_system, 'temperature')

@property
Expand Down

0 comments on commit 536ec26

Please sign in to comment.