This repository has been archived on 2023-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
homeassistant-config/packages/button/dimming.yaml

13 lines
440 B
YAML
Raw Normal View History

# script:
# indirect_brightness_increase:
# sequence:
# - service: light.turn_on
# entity_id: light.indirect
# data_template:
# brightness: >
# {% set incr = 10 %}
# {% set current = (state_attr('light.indirect', 'brightness') | int) %}
# {% set new = current | int + incr %}
# {% if new > 255 %} 255
# {% else %} {{ new_brightness }}
# {% endif %}