Tibber power factor (#52223)
This commit is contained in:
parent
0d6e73236a
commit
f1b5183e47
4 changed files with 13 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
"domain": "tibber",
|
"domain": "tibber",
|
||||||
"name": "Tibber",
|
"name": "Tibber",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tibber",
|
"documentation": "https://www.home-assistant.io/integrations/tibber",
|
||||||
"requirements": ["pyTibber==0.17.0"],
|
"requirements": ["pyTibber==0.18.0"],
|
||||||
"codeowners": ["@danielhiversen"],
|
"codeowners": ["@danielhiversen"],
|
||||||
"quality_scale": "silver",
|
"quality_scale": "silver",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
|
|
|
@ -10,6 +10,7 @@ from homeassistant.components.sensor import (
|
||||||
DEVICE_CLASS_CURRENT,
|
DEVICE_CLASS_CURRENT,
|
||||||
DEVICE_CLASS_ENERGY,
|
DEVICE_CLASS_ENERGY,
|
||||||
DEVICE_CLASS_POWER,
|
DEVICE_CLASS_POWER,
|
||||||
|
DEVICE_CLASS_POWER_FACTOR,
|
||||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||||
DEVICE_CLASS_VOLTAGE,
|
DEVICE_CLASS_VOLTAGE,
|
||||||
STATE_CLASS_MEASUREMENT,
|
STATE_CLASS_MEASUREMENT,
|
||||||
|
@ -18,6 +19,7 @@ from homeassistant.components.sensor import (
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ELECTRICAL_CURRENT_AMPERE,
|
ELECTRICAL_CURRENT_AMPERE,
|
||||||
ENERGY_KILO_WATT_HOUR,
|
ENERGY_KILO_WATT_HOUR,
|
||||||
|
PERCENTAGE,
|
||||||
POWER_WATT,
|
POWER_WATT,
|
||||||
SIGNAL_STRENGTH_DECIBELS,
|
SIGNAL_STRENGTH_DECIBELS,
|
||||||
VOLT,
|
VOLT,
|
||||||
|
@ -127,6 +129,12 @@ RT_SENSOR_MAP = {
|
||||||
STATE_CLASS_MEASUREMENT,
|
STATE_CLASS_MEASUREMENT,
|
||||||
],
|
],
|
||||||
"accumulatedCost": ["accumulated cost", None, None, STATE_CLASS_MEASUREMENT],
|
"accumulatedCost": ["accumulated cost", None, None, STATE_CLASS_MEASUREMENT],
|
||||||
|
"powerFactor": [
|
||||||
|
"power factor",
|
||||||
|
DEVICE_CLASS_POWER_FACTOR,
|
||||||
|
PERCENTAGE,
|
||||||
|
STATE_CLASS_MEASUREMENT,
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -395,6 +403,8 @@ class TibberRtDataHandler:
|
||||||
for sensor_type, state in live_measurement.items():
|
for sensor_type, state in live_measurement.items():
|
||||||
if state is None or sensor_type not in RT_SENSOR_MAP:
|
if state is None or sensor_type not in RT_SENSOR_MAP:
|
||||||
continue
|
continue
|
||||||
|
if sensor_type == "powerFactor":
|
||||||
|
state *= 100.0
|
||||||
if sensor_type in self._entities:
|
if sensor_type in self._entities:
|
||||||
async_dispatcher_send(
|
async_dispatcher_send(
|
||||||
self.hass,
|
self.hass,
|
||||||
|
|
|
@ -1273,7 +1273,7 @@ pyRFXtrx==0.27.0
|
||||||
# pySwitchmate==0.4.6
|
# pySwitchmate==0.4.6
|
||||||
|
|
||||||
# homeassistant.components.tibber
|
# homeassistant.components.tibber
|
||||||
pyTibber==0.17.0
|
pyTibber==0.18.0
|
||||||
|
|
||||||
# homeassistant.components.dlink
|
# homeassistant.components.dlink
|
||||||
pyW215==0.7.0
|
pyW215==0.7.0
|
||||||
|
|
|
@ -710,7 +710,7 @@ pyMetno==0.8.3
|
||||||
pyRFXtrx==0.27.0
|
pyRFXtrx==0.27.0
|
||||||
|
|
||||||
# homeassistant.components.tibber
|
# homeassistant.components.tibber
|
||||||
pyTibber==0.17.0
|
pyTibber==0.18.0
|
||||||
|
|
||||||
# homeassistant.components.nextbus
|
# homeassistant.components.nextbus
|
||||||
py_nextbusnext==0.1.4
|
py_nextbusnext==0.1.4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue