mirror of https://github.com/home-assistant/core
Tibber Pulse for homes without subscriptions (#20246)
This commit is contained in:
parent
fb52f66da0
commit
0987219b28
|
@ -45,11 +45,12 @@ async def async_setup_platform(hass, config, async_add_entities,
|
||||||
except aiohttp.ClientError as err:
|
except aiohttp.ClientError as err:
|
||||||
_LOGGER.error("Error connecting to Tibber home: %s ", err)
|
_LOGGER.error("Error connecting to Tibber home: %s ", err)
|
||||||
raise PlatformNotReady()
|
raise PlatformNotReady()
|
||||||
|
if home.has_active_subscription:
|
||||||
dev.append(TibberSensorElPrice(home))
|
dev.append(TibberSensorElPrice(home))
|
||||||
if home.has_real_time_consumption:
|
if home.has_real_time_consumption:
|
||||||
dev.append(TibberSensorRT(home))
|
dev.append(TibberSensorRT(home))
|
||||||
|
|
||||||
async_add_entities(dev, False)
|
async_add_entities(dev, True)
|
||||||
|
|
||||||
|
|
||||||
class TibberSensorElPrice(Entity):
|
class TibberSensorElPrice(Entity):
|
||||||
|
|
|
@ -16,7 +16,7 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_STOP, CONF_ACCESS_TOKEN,
|
||||||
from homeassistant.helpers import discovery
|
from homeassistant.helpers import discovery
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
|
||||||
REQUIREMENTS = ['pyTibber==0.9.0']
|
REQUIREMENTS = ['pyTibber==0.9.1']
|
||||||
|
|
||||||
DOMAIN = 'tibber'
|
DOMAIN = 'tibber'
|
||||||
|
|
||||||
|
|
|
@ -879,7 +879,7 @@ pyRFXtrx==0.23
|
||||||
pySwitchmate==0.4.4
|
pySwitchmate==0.4.4
|
||||||
|
|
||||||
# homeassistant.components.tibber
|
# homeassistant.components.tibber
|
||||||
pyTibber==0.9.0
|
pyTibber==0.9.1
|
||||||
|
|
||||||
# homeassistant.components.switch.dlink
|
# homeassistant.components.switch.dlink
|
||||||
pyW215==0.6.0
|
pyW215==0.6.0
|
||||||
|
|
Loading…
Reference in New Issue