- id: '1598620672731'alias: Automation Example - ACdescription: ''trigger:- device_id: 21344e46f93c4ff4afd28a6e385579d7domain: binary_sensorentity_id: binary_sensor.fridge_doorfor:hours: 0minutes: 3seconds: 0platform: devicetype: opened- device_id: b7125ee6981346319aed928466115567domain: binary_sensorentity_id: binary_sensor.freezer_doorfor:hours: 0minutes: 3seconds: 0platform: devicetype: openedcondition:- condition: stateentity_id: switch.family_room_box_fan_leftstate: 'on'action:- repeat:count: '2'sequence:- data_template:entity_id: '{% if freezer in trigger.trigger.entity_id %} media_player.freezer{% elif fridge in trigger.trigger.entity_id %} media_player.freezer {%else %} media_player.all_devices_group {% endif %}'message: "{{ [\n \"Please turn off fan or close window\",\n \"Woah nellie\\ close that window the AC is on\",\n \"We're not cooling the world close\\ the window\",\n \"Please close the window\",\n \"The AC is on close\\ the window\",\n \"We're not millionaires close that window\"] | random\\ }}"service: tts.cloud_say- delay: 00:01:00- data_template:entity_id: '{% if freezer in trigger.trigger.entity_id %} media_player.freezer{% elif fridge in trigger.trigger.entity_id %} media_player.freezer {% else%} media_player.all_devices_group {% endif %}'message: "{{ [\n \"Last chance, close the window\",\n \"I warned you\",\n \"\That's it\",\n ] | random }}"service: tts.cloud_say- condition: templatevalue_template: '''{{ trigger.to_state.state == ''on'' }}'''- data: {}entity_id: switch.bedroom_box_fan_side, switch.family_room_box_fan_left, switch.family_room_box_fan_rightservice: switch.turn_offmode: single