Competing automations

Hi,

I’ve got two automations which set the flow temp of my heat pump when the cost of electricity rises. (There are also automations which raise the flow temp when the price falls).

Automation 1: When the price goes above 0, set the flow temp to 40

Automation 2: When the price goes above input_number.value, set the flow temp to 20.

This morning, input_number.value was set to 5p, but at 4am the price went from 0p to 9p. My flow temp got set to 40 and stayed there until I woke up :frowning: This burned through 7 kWh, when I really wanted it to use almost zero.

How can I avoid this situation? It seems obvious to a human that the automations should run in the order of the trigger value, but it seems HA doesn’t do this. Actually I wonder if it’s running them in alphabetical order of the automation name! (This happened last night too, but I guess it could still be random).

Thanks,
Bruce

The automations cannot nor should they care about one another unless you tell them to. It’s running them however they triggered. If they have the capacity to interfere with each other you will have to code around it or just combine them into one automation that sets the correct condition. (preferred)

Theres some kind of nested if x then y except if Z is true do W Going on here and the only way you’ll reconcile it is thinking about them together and writing your automation accordingly…

Add some conditions to your automations. e.g.

Automation 1: When the price goes above 0, set the flow temp to 40, but only if the price is < input_number.

Thanks both, that makes sense. I have a growing number of automations so I think combining them will also help me manage them all. :slight_smile: