Files
smart-domofon/ge1mer/domofon_packages/number.yaml
Nikolay Vasilchuk ed516952e3 Fix brightness
2021-10-15 21:02:44 +03:00

21 lines
458 B
YAML

number:
- platform: template
name: "${board_name} LED Brightness"
icon: "mdi:led-on"
id: led_brightness
optimistic: true
restore_value: true
initial_value: 7
min_value: 0
max_value: 10
step: 1
on_value:
then:
if:
condition:
light.is_on: rgb_led
then:
light.control:
id: rgb_led
brightness: !lambda "return x > 0 ? x / 10 : 0.01;"