1
0
ansible-home-assistant/scripts/11.cctv.yaml

74 lines
1.9 KiB
YAML

cctv_on:
alias: CCTV on
icon: mdi:cctv
sequence:
- service: switch.turn_on
target:
entity_id:
- switch.office_camera_power_switch
- service: switch.turn_on
target:
entity_id:
- switch.living_room_recordings
- switch.living_room_snapshots
- switch.living_room_detect
- switch.hallway_recordings
- switch.hallway_snapshots
- service: switch.turn_on
target:
entity_id:
- switch.office_camera_power_switch
cctv_off:
alias: CCTV off
icon: mdi:cctv-off
sequence:
- service: switch.turn_off
target:
entity_id:
- switch.office_camera_power_switch
- service: switch.turn_off
target:
entity_id:
- switch.living_room_recordings
- switch.living_room_snapshots
- switch.living_room_detect
- switch.hallway_recordings
- switch.hallway_snapshots
cctv_snapshot_all:
alias: CCTV snapshot all
icon: mdi:cctv
sequence:
- service: camera.snapshot
data:
filename: /config/www/cctv/hallway.jpg
target:
entity_id: camera.hallway
- service: camera.snapshot
data:
filename: /config/www/cctv/living_room.jpg
target:
entity_id: camera.living_room
- service: camera.snapshot
data:
filename: /config/www/cctv/3d_printer.jpg
target:
entity_id: camera.3d_printer
- service: camera.snapshot
data:
filename: /config/www/cctv/balcony.jpg
target:
entity_id: camera.balcony
- service: notify.home_assistant
data:
message: >
All camera snapshot
target: [ "1070507369164984372" ]
data:
images:
- "/config/www/cctv/hallway.jpg"
- "/config/www/cctv/living_room.jpg"
- "/config/www/cctv/3d_printer.jpg"
- "/config/www/cctv/balcony.jpg"