Advertisement
fablav

Automazione 1click Ikea rodret

Mar 16th, 2024
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.18 KB | Software | 0 0
  1. alias: Pulsante Ikea ingresso 1click on
  2. description: ""
  3. trigger:
  4.   - platform: state
  5.     entity_id:
  6.      - counter.conta_ingresso
  7.     to: "0"
  8.     id: "0"
  9.   - platform: state
  10.     entity_id:
  11.      - counter.conta_ingresso
  12.     to: "1"
  13.     id: "1"
  14.   - platform: state
  15.     entity_id:
  16.      - counter.conta_ingresso
  17.     to: "2"
  18.     id: "2"
  19.   - platform: state
  20.     entity_id:
  21.      - counter.conta_ingresso
  22.     to: "3"
  23.     id: "3"
  24.   - platform: state
  25.     entity_id:
  26.      - light.ingresso
  27.     to: "off"
  28.     id: reset
  29.     alias: Reset contatore allo spegnimento
  30. condition: []
  31. action:
  32.   - choose:
  33.       - conditions:
  34.           - condition: trigger
  35.             id:
  36.              - "0"
  37.         sequence:
  38.           - service: light.turn_off
  39.             metadata: {}
  40.             data: {}
  41.             target:
  42.               entity_id: light.ingresso
  43.       - conditions:
  44.           - condition: trigger
  45.             id:
  46.              - "1"
  47.         sequence:
  48.           - service: light.turn_on
  49.             metadata: {}
  50.             data: {}
  51.             target:
  52.               entity_id: light.luce_ingresso_1
  53.           - service: light.turn_off
  54.             metadata: {}
  55.             data: {}
  56.             target:
  57.               entity_id: light.luce_ingresso_2
  58.       - conditions:
  59.           - condition: trigger
  60.             id:
  61.              - "2"
  62.         sequence:
  63.           - service: light.turn_off
  64.             metadata: {}
  65.             data: {}
  66.             target:
  67.               entity_id: light.luce_ingresso_1
  68.           - service: light.turn_on
  69.             metadata: {}
  70.             data: {}
  71.             target:
  72.               entity_id: light.luce_ingresso_2
  73.       - conditions:
  74.           - condition: trigger
  75.             id:
  76.              - "3"
  77.         sequence:
  78.           - service: light.turn_on
  79.             metadata: {}
  80.             data: {}
  81.             target:
  82.               entity_id: light.ingresso
  83.       - conditions:
  84.           - condition: trigger
  85.             id:
  86.              - reset
  87.         sequence:
  88.           - service: counter.reset
  89.             metadata: {}
  90.             data: {}
  91.             target:
  92.               entity_id: counter.conta_ingresso
  93.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement