Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # LONG PRESS UP (FLOW DIMMING)
- - conditions: "{{ event in (2001, 3001) }}"
- sequence:
- - service: light.turn_on
- data:
- entity_id: "{{ light }}"
- - repeat:
- while: []
- sequence:
- - service: light.turn_on
- data:
- entity_id: "{{ light }}"
- brightness: >-
- {%- set brightness = state_attr(light, 'brightness') | int %}
- {%- set step = (254 / (long_press_transition | int)) | round(0, 'floor') %}
- {% if event == 3001 %}
- {% set step = 0 - step %}
- {% endif %}
- {{ state_attr(light, 'brightness') | int + step }}
- - delay: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement