Tibber Pulse for homes without subscriptions (#20246)

This commit is contained in:
Daniel Høyer Iversen 2019-01-19 19:23:22 +01:00 committed by Rohan Kapoor
parent fb52f66da0
commit 0987219b28
3 changed files with 5 additions and 4 deletions

View File

@ -45,11 +45,12 @@ async def async_setup_platform(hass, config, async_add_entities,
except aiohttp.ClientError as err:
_LOGGER.error("Error connecting to Tibber home: %s ", err)
raise PlatformNotReady()
dev.append(TibberSensorElPrice(home))
if home.has_active_subscription:
dev.append(TibberSensorElPrice(home))
if home.has_real_time_consumption:
dev.append(TibberSensorRT(home))
async_add_entities(dev, False)
async_add_entities(dev, True)
class TibberSensorElPrice(Entity):

View File

@ -16,7 +16,7 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_STOP, CONF_ACCESS_TOKEN,
from homeassistant.helpers import discovery
from homeassistant.helpers.aiohttp_client import async_get_clientsession
REQUIREMENTS = ['pyTibber==0.9.0']
REQUIREMENTS = ['pyTibber==0.9.1']
DOMAIN = 'tibber'

View File

@ -879,7 +879,7 @@ pyRFXtrx==0.23
pySwitchmate==0.4.4
# homeassistant.components.tibber
pyTibber==0.9.0
pyTibber==0.9.1
# homeassistant.components.switch.dlink
pyW215==0.6.0