Advertisement
adorobis

IKEA single double click

Sep 16th, 2023
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1.  
  2. alias: Ikea Remote 2 - Right Single
  3. description: ""
  4. trigger:
  5. - platform: state
  6. entity_id:
  7. - sensor.ikea_remote_2_action
  8. to: arrow_right_click
  9. condition: []
  10. action:
  11. - choose:
  12. - conditions:
  13. - condition: numeric_state
  14. entity_id: cover.taras_dach
  15. attribute: current_position
  16. below: "100"
  17. sequence:
  18. - choose:
  19. - conditions:
  20. - condition: or
  21. conditions:
  22. - condition: state
  23. entity_id: cover.taras_dach
  24. state: opening
  25. - condition: state
  26. entity_id: cover.taras_dach
  27. state: closing
  28. sequence:
  29. - service: cover.stop_cover
  30. data: {}
  31. target:
  32. entity_id:
  33. - cover.taras_dach
  34. default:
  35. - wait_for_trigger:
  36. - platform: state
  37. entity_id:
  38. - sensor.ikea_remote_2_action
  39. to: arrow_right_click
  40. timeout:
  41. milliseconds: 500
  42. - choose:
  43. - conditions:
  44. - condition: template
  45. value_template: "{{ wait.trigger == none }}"
  46. sequence:
  47. - service: cover.set_cover_position
  48. data:
  49. position: >-
  50. {{ state_attr("cover.taras_dach",
  51. "current_position") + 1 }}
  52. target:
  53. entity_id: cover.taras_dach
  54. default:
  55. - service: cover.open_cover
  56. data: {}
  57. target:
  58. entity_id:
  59. - cover.taras_dach
  60. default: []
  61. mode: single
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement