Skip to content

Instantly share code, notes, and snippets.

@kai-zer-ru
Created February 27, 2024 07:41
Show Gist options
  • Save kai-zer-ru/a663874ca0d3bb348061c64a5d85e84e to your computer and use it in GitHub Desktop.
Save kai-zer-ru/a663874ca0d3bb348061c64a5d85e84e to your computer and use it in GitHub Desktop.
svet_koridor
alias: Свет в коридоре по движению 2
description: ""
mode: single
trigger:
- type: motion
platform: device
device_id: 8b0d7526f12ff9cbdc9959bcf30f0d0a
entity_id: binary_sensor.datchik_dvizheniia_v_koridore_occupancy
domain: binary_sensor
condition:
- condition: device
type: is_on
device_id: 17ea0238b4c4b1af8e6665ecd3bcf778
entity_id: switch.vykliuchatel_v_koridore_right
domain: switch
action:
- service: timer.cancel
entity_id: timer.svet_v_koridore
- service: timer.start
data:
duration: "{{ states('input_number.timer_v_koridore_duration')|int * 60 }}"
target:
entity_id: timer.svet_v_koridore
alias: Свет в коридоре - перезапуск таймера
description: ""
trigger:
- type: motion
platform: device
device_id: 8b0d7526f12ff9cbdc9959bcf30f0d0a
entity_id: a8e94b7a1452e2ea4684d4a54c0a3393
domain: binary_sensor
condition:
- condition: device
type: is_on
device_id: 17ea0238b4c4b1af8e6665ecd3bcf778
entity_id: switch.vykliuchatel_v_koridore_right
domain: switch
action:
- service: timer.cancel
entity_id: timer.svet_v_koridore
- service: timer.start
data:
duration: "{{ states('input_number.timer_v_koridore_duration')|int * 60 }}"
target:
entity_id: timer.svet_v_koridore
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment