Hi guys,
Does anyone know if it’s possible to have 1 trigger to do different actions according to their conditions?
Something like this:
- alias: Do stuff when someone rings the doorbell
trigger:
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_xxxx
click_type: single
action:
- service: shell_command.get_entrance_image
- service: notify.slack_general
data:
message: "Ding Dong! Someone just rang the doorbell!"
- delay:
seconds: 5
- service: shell_command.send_doorbell_image_to_slack
condition:
condition: state
entity_id: device_tracker.living_room_tv
state: home
action:
- service: scene.turn_on
entity_id: scene.play_entrance_camera_to_tv
So basically always send a slack notification/image when someone rings the bell BUT if the tv is on, also send the image to the TV.
I know I can duplicate the trigger and it works but I hate to duplicate so many things all over the place.
Thanks