Skip to content

Commit

Permalink
Add unique id for Tibber sensor (#12864)
Browse files Browse the repository at this point in the history
Upgrade Tibber libary
  • Loading branch information
Danielhiversen authored and MartinHjelmare committed Mar 3, 2018
1 parent d8a11fd commit 49581a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion homeassistant/components/sensor/tibber.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
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__)

Expand Down Expand Up @@ -103,3 +103,9 @@ def icon(self):
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']
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49581a4

Please sign in to comment.