Hi,
I’m triying to made a realtiv complex automation for a sprinker system.
One goal was to select the start and stop time in the UI with an input_datetime helper. I’m having a pretty hard time to get this to work. (why is thats so incredible complicated with template etc…?)
Now I need to compare input_datetime with < and >. Is that even possbile without template? I’m pretty bad at templating…
It should look something like this. (Sorry I’m REALY bad )
{% if states('sensor.time') > (states.input_datetime.start_bewaesserung_erd.attributes.timestamp) and
{% if states('sensor.time') < (states.input_datetime.start_bewaesserung_erd.attributes.timestamp)
Then = TRUE
{% endif %}
And this should be a condition in this automation
- id: auto_steuerung_erd
alias: Erdbeeren Auto Steuerung
description: ''
trigger:
- entity_id: input_boolean.auto_steuerung_erd_1
platform: state
to: 'on'
condition: []
action:
- data: {}
entity_id: input_boolean.manuelle_steuerung_erd_1
service: input_boolean.turn_off
You can define a datetime with date and time and this will pick off the time portion to determine when to start. Then create separate automation to step through each circuit and probably utilizing a timer. Just a thought.
Thanks for reply.
I already have an automation for the start timer. Works great.
But I want to control the water in manual and auto. I already made an automation for this. But the problem is:
IF manual mode is on and I switch to auto mode, AND its between START and STOP time, to Cycle won’t start, because I need this in my First Post.
the HA Schedular Addon did exactly what I want. The hole automation is a lot easier now.
The only problem is, that I cant insert the time value via Lovelace.
I asked the developer to add this feature. I’m not sure its possible^^
@Hellis81
Thanks! I know this tool. But my template skills are simple not powerful enough to achieved my goal
In the template tool.
My datetime here is a datetime with only time so by default it’s something like 11:55:00.
Sensor.time is something like 12:01.
By using the attribute timestamp we get the second of the day that the datetime is, then we convert that back to H:M format (in reality we remove the “:00” at the end).
This should be two formats that can be compared.
The last line that does not fit the screen is: {{ states.input_datetime.test.attributes.timestamp | timestamp_custom("%H:%M", false) > states.sensor.time.state }}
With that type of format your automation should work.