Add unique id for Tibber sensor (#12864)

Upgrade Tibber libary
pull/12870/head
Daniel Høyer Iversen 2018-03-03 13:18:45 +01:00 committed by Martin Hjelmare
parent d8a11fd706
commit 49581a4a2a
2 changed files with 8 additions and 2 deletions

View File

@ -20,7 +20,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.entity import Entity
from homeassistant.util import dt as dt_util
REQUIREMENTS = ['pyTibber==0.3.0']
REQUIREMENTS = ['pyTibber==0.3.2']
_LOGGER = logging.getLogger(__name__)
@ -103,3 +103,9 @@ class TibberSensor(Entity):
def unit_of_measurement(self):
"""Return the unit of measurement of this entity."""
return self._unit_of_measurement
@property
def unique_id(self):
"""Return an unique ID."""
home = self._tibber_home.info['viewer']['home']
return home['meteringPointData']['consumptionEan']

View File

@ -644,7 +644,7 @@ pyHS100==0.3.0
pyRFXtrx==0.21.1
# homeassistant.components.sensor.tibber
pyTibber==0.3.0
pyTibber==0.3.2
# homeassistant.components.switch.dlink
pyW215==0.6.0