I have a smart plug that gives usage information in this sensor: sensor.moilux_smart_plug_power
Because I want statistics by hour,day week and month I added this to the utility meter platform in configuration.yaml
dageijks_gebruik_moilux:
source: sensor.moilux_smart_plug_power
cycle: daily
uurlijks_gebruik_moilux:
source: sensor.moilux_smart_plug_power
cycle: hourly
wekelijks_gebruik_moilux:
source: sensor.moilux_smart_plug_power
cycle: weekly
maandelijks_gebruik_moilux:
source: sensor.moilux_smart_plug_power
cycle: monthly
Unfortunately the result/state I get is “unavailable”. What mistake do I make.
AllHailJ
(J Gent)
2
Mine are like this: Your yaml
dageijks_gebruik_moilux:
source: "sensor.moilux_smart_plug_power"
cycle: daily
uurlijks_gebruik_moilux:
source: "sensor.moilux_smart_plug_power"
cycle: hourly
wekelijks_gebruik_moilux:
source: "sensor.moilux_smart_plug_power"
cycle: weekly
maandelijks_gebruik_moilux:
source: "sensor.moilux_smart_plug_power"
cycle: monthly
Edwin_D
(Edwin D.)
3
What type of data does the entity provide? It should be kWh, not W.
unit_of_measurement: W
If that is not correct, is there another way to achieve my goal ?
Edwin_D
(Edwin D.)
6
You need an integral sensor to convert the wattage to kWh. See:
Thank you all. Will dive into this