-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automation trigger lowest price or highest price of the day #18
Comments
You can do that with the build HA automation. You can compare current price with lowest and highest. As an action you can then send a notification. (sorry no example) |
When I try to do this: I get an error: Sorry, I'm new and helpless knowledge; trying to learn. |
The described template should work and it should also work without the casts to float. The lowest_energy_price_today value is retrieved from the same array as the current all-in price so the values should also be an exact match. For me, the template |
I have created a binary sensor for this in configuraton.yaml
For my plugs (eg charging phone) I use this automation. It also plays a message on all my speakers
|
For me the binary sensor mentioned above did not work in my configuration.yaml. - platform: template
sensors:
happy_hour:
unique_id: happyhour
value_template: "{{ (states('sensor.current_electricity_price_all_in') | round(4,default=0) == states('sensor.lowest_energy_price_today') | round(4,default=1)) | default('off') }}" |
The code mentioned above works, but only for today. |
I think it's better to do something with the prices attributes:
This should be true when the end time ( |
Dit werkt niet bij mij....geeft altijd True aan {% set endtime = (state_attr('sensor.current_electricity_price_all_in', 'prices') | |
Works for me Tnx! State is “False” or “True”. (Spelling incl. caps is crucial for proper functioning)
|
How would you create an extra binary sensor called e.g. “below zero” to have a longer period available in which interesting rates can be used? In my condig “Happy Hour” is one hour only |
Maybe you can use a 'Threshold sensor': https://www.home-assistant.io/integrations/threshold/. Create one in 'helpers' |
Is it possible to create an automation to, for example, receive a notification if the price becomes the lowest (or highest) of the day?
The text was updated successfully, but these errors were encountered: