Hi everyone,
This driving me nuts, that I can’t see what’s probably abvious. So please help me get a better understanding
So I have these rules here which in my head makes sense and they do also work:
Living Room
LED Light TV
- alias: '[Living Room] LED Turn On'
trigger:
platform: state
entity_id: media_player.samsung_tv
from: 'off'
to: 'on'
condition:
condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_on
entity_id: light.led_tv_mbel
- alias: '[Living Room] LED Turn Off'
trigger:
platform: state
entity_id: media_player.samsung_tv
from: 'on'
to: 'off'
condition:
condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_off
entity_id: light.led_tv_mbel
If you look at my action, then I’m calling the ligh.turn_on & off.
Both rules are shows in my ui under the automations card;
Then I have these rules here, which I’ve kinda copied somewhere from here in the community, in order to get some of the basic things up and running in the beginning. If you take a look at the actions - then it has double service?
Hobbyroom
Motion Sensor Trigger light
- alias: '[Hobbyroom] Motion/Lux Turn On Gateway LED'
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00012441a4
from: 'off'
to: 'on'
condition:
condition: numeric_state
entity_id: sensor.illumination_158d00012441a4
below: 100
action:
- service: light.turn_on //This one does the actual command
entity_id: light.gateway_light_34ce0088ed14
data:
brightness: 5
color_name: red
- service: automation.turn_on //But what does this do and why?
data:
entity_id: automation.MOTION_ON
- alias: '[Hobbyroom] Motion/Lux Tun Off Gateway LED'
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00012441a4
from: 'on'
to: 'off'
for:
minutes: 5
action:
- service: light.turn_off //This one does the actual command
entity_id: light.gateway_light_34ce0088ed14
- service: automation.turn_off //But what does this do and why?
data:
entity_id: automation.MOTION_OFF
So why is that extra part even there and is it needed?