Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions homeassistant/components/sensor/tibber.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,16 @@ async def async_added_to_hass(self):

async def _async_callback(self, payload):
"""Handle received data."""
data = payload.get('data', {})
live_measurement = data.get('liveMeasurement', {})
errors = payload.get('errors')
if errors:
_LOGGER.error(errors[0])
return
data = payload.get('data')
Comment thread
Danielhiversen marked this conversation as resolved.
if data is None:
return
live_measurement = data.get('liveMeasurement')
if live_measurement is None:
return
self._state = live_measurement.pop('power', None)
self._device_state_attributes = live_measurement
self.async_schedule_update_ha_state()
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tibber/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from homeassistant.helpers import discovery
from homeassistant.helpers.aiohttp_client import async_get_clientsession

REQUIREMENTS = ['pyTibber==0.7.4']
REQUIREMENTS = ['pyTibber==0.7.5']

DOMAIN = 'tibber'

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ pyRFXtrx==0.23
pySwitchmate==0.4.3

# homeassistant.components.tibber
pyTibber==0.7.4
pyTibber==0.7.5

# homeassistant.components.switch.dlink
pyW215==0.6.0
Expand Down