Hey all,
I’m looking for an automation-solution with a specific requirement.
Based on having a specific PV surplus (trigger) for a certain period and under the condition of being below a specific room temperature (condition), a socket should be activated (action).
My problem is that if the condition is not met at the time of trigger activation but is met later, the automation does not trigger again (missing trigger).
Creating the second automation with temperature as trigger and PV surplus as condition is not the same, as I cannot set a time period as condition for the PV surplus.
Is there any easy solution for this. I’m coming from ioBroker and implemented this behavior there in Blockly.
I have a workaround in mind, but it requires kind of variables or helpers which I would like to avoid.
Btw: Originally I planned to have one “Turn on” Automation and two “Turn off” automations (one temperature based, one PV surplus based).
Two things - not sure, if either of them will resolve the issue, but let’s take it step by step:
The trigger for sensor.scb_grid_power shows below: -600 while the condition for the same sensor shows below: 600 - so there’s either a ‘-’ missing or one too many.
Conditions are ‘AND’ by default, so line 2 and 3 in the conditions section are superfluous at best, maybe also causing an issue (not sure about it, though):
Thanks, 600 is indeed an error. I was to fast yesterday evening. - means that energy is feeded into the grid. And also thanks for the hint with the hint. I will make it as easy as possible.
You should be able to use the same for parameter on your state condition as well. If you don’t, the automation will trigger on the change of temperatur_bad without taking into account how long scb_power_grid has held the correct value.
Also do replace your device action at the end with a switch.turn_on action. Device actions are easy to setup in the visual editor, but impossible to understand which devices/entities they act on by looking at the code.
Thanks for the idea. Unfortunately the “for” is not allowed for numeric_states.
In the meantime my conclusion is: The triggers in combination with conditions are wrong. They are just not correctly implemented in HA. A trigger is always related to its condition. I tried to create the conditions also as trigger and vice versa. But if you come to the timer-dependency, it’s simply not the same anymore.