Looked through the examples but couldn’t find a rule to make several forks of actions based on condition.
I have na input select for the home theater with options radio, movie e.t.c
What i would like to do is that one selects an option movie - the rule first checks time of the day (day/evening/night) and depending on that sets the volume and other options (like late night option).
What is the simplest way to that other than writing more than 3 of the same rules with different conditions?
Yes thank you!
Looks extremely promissing. At first the selector will set everything in automation which is particular for both like switch.on, set source, set listen mode and than at the end we call a template script which will fork depending on the state of selector day, night, guests. Sounds excellent and hope it works
At first wanted to do it with input select and then write some automation rules. Than rembebered that it can be don way better by using the template sensor.
For sure my noob setup won’t be that interesting but finished up like this
Sensor data:
- platform: template
sensors:
day_night:
friendly_name: 'Day or Night'
value_template: >-
{%- if now().hour > 20 and now().hour < 24 %}
Night
{% elif now().hour > 0 and now().hour < 7 %}
Night
{% else %}
Day
{%- endif %}