Ok. This might be the issue. I assumed I’d get a call since it is under 31.
Was going to add to this. With some other conditions. Maybe this is the wrong trigger?
But basically I want the pump to turn on
anytime the temp goes below 31 (as it is whole numbers will turn on at 30 or less)
8:30 - 9pm
and energy price is less than 0.15/kWh
-needs to turn off and on with temperature
-off and on with energy price
Turn off at 9pm
and turn back on the next day (pool will already be cooler, as it looses ~2c overnight in summer and 3-5c in winter) the first time and anytime those conditions are met.
Plan was for one on automation using temp below and then conditions and then a few pump off automations.
If you are happy for it to only trigger when the temp goes from 31 or higher to below 31 then this will work. If the pool temp is already 30 or below then nothing will happen, as finity has eluded to.
Since you now have other parameters you want to check against you can simply use the time as the trigger and the temp and energy price as conditions
so small problem…it seems that about once every 3hours the the Rest call fails/returns no value and I get the following warning
Template variable warning: 'mappingproxy object' has no attribute 'temperature' when rendering '{{ states.sensor.pool_status.attributes["temperature"] }}'
and error on the entity that is the pool heater pump
TemplateError('UndefinedError: 'mappingproxy object' has no attribute 'channels'') while processing template 'Template("{{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes ["channels"][4]["mode"]|int] }}")' for attribute '_attr_native_value' in entity 'sensor.pool1_channels4_mode'
Result is that the Temperature Entity triggers the automation. I guess because the error current, in the conditions it believes the pump is off - when it is in fact on. Which results in the the action running and turning off the pump I want to remain on.
The Action is a Rest Command that is the same action_code to turn off as on. If it is off it turns it on and iff it is on it turns it off…that is why i have the condition to check it’s current status.
what could i do to delay between trigger and condition check? or ignore when this error occurs? I don’t think there is anything I can do to stop the error…just something that occasionally happens