Been testing Home Assistant for a few weeks now and I mostly got things working. I have one weird problem though. I have added integration with Tibber, and I can see the prices for electricity etc without problems. But I wanted to try adding an automation that would change the color of a Shelly lightbulb whenever the price is a certain value.
The lightbulb works and I can manually change color, turn it on and off etc (from Home Assistant).
I can create another automation that changes the color of the light at a certain times, this works.
When I instead set that the light should change color when the price is above or below a certain value, it never ever triggers.
My first attempt involved adding a trigger with
entity “Electricity price Home”
attribute “Avg Price”
Above mode, fixed number above “0.03”
Below mode, fixed number below “0.11”
Then I added similar automations for other ranges to give different colors. This was my first try and nothing happened. Since then I’ve messed around with templates a lot and tried the following for one trigger:
Yes it is now, that why it doesn’t “Trigger” a Trigger is “like a button” it does something when you “press it” … so , IF it is Above 1.0, it will trigger when it gets Below ! (Trigger 1 time) , never again
Again A trigger-event occur WHEN something(specified) happens AND only then,
So change your automation( if you want to use an automation for this ) and add “Conditions”.( if price is above, change color )
Maybe you should try to look at Templates for this , you can specify much more in details.
I.E
For your Shelby-Light-entity
IF el-pris-state <=0.1, then Shelby-Light-entity_color=green, elif el-pris-state >0.1 then Shelby-Light-entity_color=yellow, elif el-pris-state >=1.0 then Shelby-Light-entity_colo=red