Hello all,
I have add this in my action.yaml is there a way to make this much easier?
I want change from Domotic to HA. Have lot of scripts running that do checks before actions:
I understand the condition part little bit. But the action part I need have some if this then that statement as well. Can someone help me with some simple way to do i.f.t.t.t. part inside action?
#TEST 1
- alias: Test
initial_state: true
trigger:
platform: state
entity_id: light.balcony_all
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_on
data:
entity_id: light.dressoir_1
kelvin: 3000
brightness: 255
- service: light.turn_on
data:
entity_id: light.dressoir_2
kelvin: 3000
brightness: 255
- service: light.turn_on
data:
entity_id: light.dressoir_3
kelvin: 3000
brightness: 255
When for example a light is already on then light.dressoir_1 must be red instead of kelvin. Or when date is first xmas day then light.dressoir_2 must be green. (example)