Add demand window sensor for amberelectric (#121356)
This commit is contained in:
parent
be0cf545b2
commit
2bc7904b51
5 changed files with 123 additions and 15 deletions
|
@ -111,6 +111,9 @@ class AmberUpdateCoordinator(DataUpdateCoordinator):
|
|||
]
|
||||
result["grid"]["renewables"] = round(general[0].renewables)
|
||||
result["grid"]["price_spike"] = general[0].spike_status.value
|
||||
tariff_information = general[0].tariff_information
|
||||
if tariff_information:
|
||||
result["grid"]["demand_window"] = tariff_information.demand_window
|
||||
|
||||
controlled_load = [
|
||||
interval for interval in current if is_controlled_load(interval)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue