diff --git a/homeassistant/components/tibber/manifest.json b/homeassistant/components/tibber/manifest.json index 90a19526c7c..9b84b9a54c2 100644 --- a/homeassistant/components/tibber/manifest.json +++ b/homeassistant/components/tibber/manifest.json @@ -3,7 +3,7 @@ "domain": "tibber", "name": "Tibber", "documentation": "https://www.home-assistant.io/integrations/tibber", - "requirements": ["pyTibber==0.21.7"], + "requirements": ["pyTibber==0.22.1"], "codeowners": ["@danielhiversen"], "quality_scale": "silver", "config_flow": true, diff --git a/homeassistant/components/tibber/sensor.py b/homeassistant/components/tibber/sensor.py index eeb072e3a62..ebb986d6a7e 100644 --- a/homeassistant/components/tibber/sensor.py +++ b/homeassistant/components/tibber/sensor.py @@ -210,7 +210,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = ( ), SensorEntityDescription( key="peak_hour", - name="Month peak hour consumption", + name="Monthly peak hour consumption", device_class=SensorDeviceClass.ENERGY, native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, ), @@ -253,17 +253,17 @@ async def async_setup_entry( if home.has_active_subscription: entities.append(TibberSensorElPrice(home)) + if coordinator is None: + coordinator = TibberDataCoordinator(hass, tibber_connection) + for entity_description in SENSORS: + entities.append(TibberDataSensor(home, coordinator, entity_description)) + if home.has_real_time_consumption: await home.rt_subscribe( TibberRtDataCoordinator( async_add_entities, home, hass ).async_set_updated_data ) - if home.has_active_subscription and not home.has_real_time_consumption: - if coordinator is None: - coordinator = TibberDataCoordinator(hass, tibber_connection) - for entity_description in SENSORS: - entities.append(TibberDataSensor(home, coordinator, entity_description)) # migrate old_id = home.info["viewer"]["home"]["meteringPointData"]["consumptionEan"] @@ -547,7 +547,7 @@ class TibberDataCoordinator(update_coordinator.DataUpdateCoordinator): hass, _LOGGER, name=f"Tibber {tibber_connection.name}", - update_interval=timedelta(hours=1), + update_interval=timedelta(minutes=20), ) self._tibber_connection = tibber_connection diff --git a/requirements_all.txt b/requirements_all.txt index 7245f7970fd..5376c7a5f11 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1362,7 +1362,7 @@ pyRFXtrx==0.27.1 # pySwitchmate==0.4.6 # homeassistant.components.tibber -pyTibber==0.21.7 +pyTibber==0.22.1 # homeassistant.components.dlink pyW215==0.7.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 3b024a1ac32..ae3fe7eb5c4 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -854,7 +854,7 @@ pyMetno==0.9.0 pyRFXtrx==0.27.1 # homeassistant.components.tibber -pyTibber==0.21.7 +pyTibber==0.22.1 # homeassistant.components.nextbus py_nextbusnext==0.1.5