Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions custom_components/ide/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
ConfigType,
DiscoveryInfoType,
)
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import homeassistant.helpers.config_validation as cv

__VERSION__ = "0.2.1"
Expand Down Expand Up @@ -121,7 +122,9 @@ async def async_added_to_hass(self) -> None:
return
self._state = state.state
_LOGGER.warning(
"i-DE Meter could not be updated. Last data restored {}".format(self._state)
"i-DE Meter could not be updated. Last reading available was restored: {}".format(
self._state
)
)

async_dispatcher_connect(
Expand All @@ -132,7 +135,7 @@ async def async_added_to_hass(self) -> None:
def _schedule_immediate_update(self):
"""Schedule Update when possible"""
self.async_schedule_update_ha_state(True)

@property
def name(self):
"""Return the name of the sensor."""
Expand Down