Advertisement
boelle11

Untitled

Jan 25th, 2021
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. blueprint:
  2. name: deConz - IKEA wireless on/off switch
  3. description: Control anything using IKEA wireless on/off switch
  4.  
  5. domain: automation
  6. input:
  7. remote:
  8. name: switch
  9. description: IKEA wireless on/off switch to use
  10. selector:
  11. device:
  12. integration: deconz
  13. manufacturer: IKEA of Sweden
  14. model: TRADFRI on/off switch
  15. button_on_short:
  16. name: On button press
  17. description: Action to run on press of On button
  18. default: []
  19. selector:
  20. action:
  21. button_off_short:
  22. name: Off button press
  23. description: Action to run on press of Off button
  24. default: []
  25. selector:
  26. action:
  27. button_on_long:
  28. name: On button hold
  29. description: Action to run on long press of On button
  30. default: []
  31. selector:
  32. action:
  33. button_off_long:
  34. name: Off button hold
  35. description: Action to run on long press of Off button
  36. default: []
  37. selector:
  38. action:
  39. button_on_release:
  40. name: On button release
  41. description: Action to run on release long press of On button
  42. default: []
  43. selector:
  44. action:
  45. button_off_release:
  46. name: Off button release
  47. description: Action to run on release long press of Off button
  48. default: []
  49. selector:
  50. action:
  51.  
  52. mode: restart
  53. max_exceeded: silent
  54.  
  55. trigger:
  56. - platform: event
  57. event_type: deconz_event
  58. event_data:
  59. device_id: !input remote
  60.  
  61. action:
  62. - variables:
  63. event: "{{ trigger.event.data.event }}"
  64. - choose:
  65. - conditions:
  66. - "{{ event == 1002 }}"
  67. sequence: !input button_on_short
  68.  
  69. - conditions:
  70. - "{{ event == 2002 }}"
  71. sequence: !input button_off_short
  72.  
  73. - conditions:
  74. - "{{ event == 1001 }}"
  75. sequence: !input button_on_long
  76.  
  77. - conditions:
  78. - "{{ event == 2001 }}"
  79. sequence: !input button_off_long
  80.  
  81. - conditions:
  82. - "{{ event == 1003 }}"
  83. sequence: !input button_on_release
  84.  
  85. - conditions:
  86. - "{{ event == 2003 }}"
  87. sequence: !input button_off_release
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement