@madpilot Is there a way to currently indicate if there is a demand window active? Is that something that is exposed through the API?
Yeah, there is a Boolean called demandWindow in the tariffInformation object in the attributes.
{{ state_attr('sensor.amber_general_price', 'tariffInformation').demandWindow }}
Will probably do it. My account doesnât have a demand window to confirm
Hi Myles
I can see where demandWindow is referenced in the API docs (within the TariffInformation schema), but Iâm struggling to implement it within HA. In the example above, you have it listed as an attribute under the general price entity. This isnât working for me, and when I expand the available attributes for general price within HA, itâs not listed there (see screenshot below).
Hoping you may be able to assist with the correct way to access this for use within HA?
Many thanks
Lee
It looks like itâs not included at the moment. Iâve got to do some updates to the integration shortly, so Iâll add it in then.
Ahh, great! Glad I wasnât going crazy.
Thatâs awesome. I really look forward to when this is available again. Thanks Myles.
Cheers
Lee
Hey Myles
Still super keen to see the boolean for demandWindow added back into General Price.
Fingers crossed on this!
Cheers
Lee
Hi Myles
I see demandWindow has been added back into the entity list.
Super awesome - thanks!!
Cheers
Lee
Just added this.
Tried the âreload amber fixâ
Still getting the error.
Executed: August 12, 2024 at 10:59:22
Error: UndefinedError: 'dict object' has no attribute 'to_state'
id: '1723423594229'
alias: Amber Lightstrip
description: control lightstrip based on amber prices
use_blueprint:
path: amberelectric/light.yaml
input:
amber_price_descriptor: sensor.13wtf_general_price_descriptor
target_light:
entity_id: light.hue_lightstrip_plus_1
The sensor is current, and has a state of âvery lowâ.
Did a complete restart.
Executed: August 12, 2024 at 11:08:06
Error: UndefinedError: 'dict object' has no attribute 'to_state'
⌠and now, while trying to debug it more, it starts working.
Peculiar.
This happened to me also. I walked away to work on it later and then noticed the light working. I think it is a HA thing. I am learning to be patient with HAâŚ
Thank you very much for this @madpilot0. I was able to go from turning on a brand new HA Green to a working automated lamp thanks to your efforts in a few steps. Also thanks to @markpurcell for pointing me to Home Assistant. Now my teenagers can plainly see the electricity prices and act accordingly. Well I can dream.