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
2022-08-05 12:54:01 +02:00

13 lines
440 B
YAML

# 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 %}