Advertisement
JLindvig

automation old

Sep 10th, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.65 KB | None | 0 0
  1. - alias: "Tænd lyset ved bevægelse"
  2.   initial_state: true
  3.   mode: parallel
  4.   trigger:
  5.     - platform: state
  6.       entity_id:
  7.        - binary_sensor.tradfri_motion_sensor
  8.       from: "off"
  9.       to: "on"
  10.   action:
  11.     - service: script.turn_on
  12.       data_template:
  13.         entity_id: script.generic_sensor_dimmer
  14.         variables:
  15.           sensor: "{{ trigger.entity_id }}"
  16.           light: >-
  17.             {%- if trigger.entity_id == "binary_sensor.tradfri_motion_sensor" %}
  18.               light.sandbox_bulb
  19.             {%- elif trigger.entity_id == "binary_sensor.other_sensors" %}
  20.               light.indgang
  21.             {% endif %}
  22.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement