I simple want this, I press button, light go on, press again, lights go off.
Problem is, while checking my automation it says that " Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/automations.yaml”, line 21, column 18
Could you help?
- alias: 'Ligar Luzes da Sala quando botao pressionado'
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001d62b0d
click_type: single
action:
service: light.turn_on
entity_id: light.yeelight_rgb_7811dca6009f
- alias: 'Desligar Luzes da Sala c/ duplo click no botao'
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001d62b0d
click_type: single
condition:
condition: state
entity_id: light.yeelight_rgb_7811dca6009f
state: 'on'
action:
service: light.turn_off
entity_id: light.yeelight_rgb_7811dca6009f