Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.06 KB | None | 0 0
  1.  - alias: 'Movement in kitchen and is dark turn on gateway lamp'
  2.     trigger:
  3.       - platform: state
  4.         entity_id: binary_sensor.konyha_mozgas
  5.         from: 'off'
  6.         to: 'on'
  7.     condition:
  8.         condition: and
  9.         conditions:
  10.           - condition: state
  11.             entity_id: light.gateway_light_04cfxxxxxxxx
  12.             state: "off"
  13.           - condition: numeric_state
  14.             entity_id: sensor.konyha_feny
  15.             below: 1
  16.     action:
  17.       - service: light.turn_on
  18.         entity_id: light.gateway_light_04cfxxxxxxxx
  19.         data:
  20.           rgb_color: [255, 0, 0]
  21.           brightness: 100
  22.       - condition:
  23.           condition: and
  24.           conditions:
  25.             - condition: state
  26.               entity_id: light.gateway_light_04cfxxxxxxxx
  27.               state: 'on'
  28.             - condition: state
  29.               entity_id: binary_sensor.konyha_mozgas
  30.               state: 'off'
  31.               for:
  32.                 seconds: 60
  33.       - service: light.turn_off
  34.         entity_id: light.gateway_light_04cfxxxxxxxx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement