I have an automation that controls a temp controller by pulling in a date/time and temperature from an outside source, stores it in a datetime helper and a number helper for the temp, then triggers at the specific datetime. I can have up to 10 steps in this process, and would like to consolidate into a single automation, but am drawing a blank as to how.
Here’s an example of a single automation. I have 10 of these currently. The conditions are because when there is no temperature set, the data comes across as 33 degrees.
How would I consolidate this into one automation? I know I could manually set trigger IDs for each datetime and triggered by for the actions, but I’m drawing a blank at the condition. I suspect it needs some sort of templating, which I’m not good at.
The helpers are all named with the following convention where X is the step 1 through 10.
Datetime: “input_datetime.fermenter_1_fermentation_step_1”
Temperature: “input_number.fermenter_1_fermentation_step_X_temp”
Could you create a number helper to hold the step and the put each step inside a choose? You would then use “number helper changed” as a trigger and ensure that each step ends with the helper being updated to the next step.
The steps are already triggered sequentially by the nature of the datetime helpers.
So I have the ability to choose my action based off of the step.
I suppose I could include the condition in the action instead of the overall automation. Then I could check if that step’s temp is 33 degrees and not change anything if so.
Solved! Thanks @reef-actor you helped me think about it in a different way… This was far easier than expected, I just needed to move the specific step’s condition to the action area.