File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,13 +36,15 @@ script:
3636# Sensor showing the actual energy diverted consumption
3737sensor :
3838 - id : energy_diverted
39- platform : total_daily_energy
39+ platform : integration
4040 name : ' Total energy diverted'
41- power_id : power_divertion
41+ sensor : power_divertion
4242 unit_of_measurement : ' kWh'
4343 state_class : total_increasing
4444 device_class : energy
4545 accuracy_decimals : 3
46+ time_unit : h
47+ restore : true
4648 filters :
4749 # Multiplication factor from W to kW is 0.001
4850 - multiply : 0.001
@@ -51,17 +53,20 @@ sensor:
5153 name : Power divertion
5254 id : power_divertion
5355 unit_of_measurement : ' W'
56+ device_class : power
5457
5558# Enable time component to
5659# - Update energy diverted counter
57- # - Reset energy at midnight
60+ # - Reset energy counter at midnight
5861time :
59- - platform : homeassistant
60- id : homeassistant_time_for_solar_router
61-
6262 - platform : sntp
6363 on_time :
6464 # Trigger action every second
6565 - seconds : /1
6666 then :
67- - script.execute : energy_diverted_counter
67+ - script.execute : energy_diverted_counter
68+ - seconds : 0
69+ minutes : 0
70+ hours : 0
71+ then :
72+ - sensor.integration.reset : energy_diverted
You can’t perform that action at this time.
0 commit comments