Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Моя автоматизация на датчик движения
- ####################################################
- # Свет по датчикам движения #
- ####################################################
- # Включение света в коридоре по датчику движения
- - alias: hall_light_pir_on
- trigger:
- platform: state
- entity_id: binary_sensor.motion_sensor_158d00018745b5
- to: 'on'
- action:
- service: homeassistant.turn_on
- entity_id: light.hall_light
- # Выключение света в коридоре по датчику движения
- - alias: hall_light_pir_off
- trigger:
- platform: state
- entity_id: binary_sensor.motion_sensor_158d00018745b5
- to: 'off'
- for:
- seconds: 1
- action:
- service: homeassistant.turn_off
- entity_id: light.hall_light
- ################################## Ваш пример:
- # Одиночный включает ваше реле:
- - alias: 123
- trigger:
- platform: state
- entity_id: sensor.0x00158d00033e88ca_click
- to: 'single'
- action:
- service: homeassistant.turn_on
- entity_id: switch.sonoff_basic_relay
- # Двойной выключает ваше реле:
- - alias: 456
- trigger:
- platform: state
- entity_id: sensor.0x00158d00033e88ca_click
- to: 'double'
- action:
- service: homeassistant.turn_off
- entity_id: switch.sonoff_basic_relay
- # Или Двойной переключает ваше реле:
- - alias: 789
- trigger:
- platform: state
- entity_id: sensor.0x00158d00033e88ca_click
- to: 'double'
- action:
- service: homeassistant.toggle
- entity_id: switch.sonoff_basic_relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement