Skip to content
Snippets Groups Projects
Commit f8df6486 authored by Jan Grewe's avatar Jan Grewe
Browse files

growbox: use fan and light components instead of number+lambda

parent cd401678
No related branches found
No related tags found
No related merge requests found
......@@ -18,46 +18,14 @@ output:
- id: gp8403_ch0
- id: gp8403_ch1
number:
- platform: template
id: dimmer_fan
fan:
- platform: speed
output: gp8403_ch0
id: fan_speed
name: "Fan: Speed"
min_value: 0
max_value: 100
step: 1
unit_of_measurement: '%'
optimistic: true
restore_value: true
on_value:
then:
- lambda: !lambda 'id(gp8403_ch0).set_level(x / 100);'
- platform: template
id: dimmer_light
name: "Light: Level"
min_value: 0
max_value: 100
step: 1
unit_of_measurement: '%'
optimistic: true
restore_value: true
on_value:
then:
- lambda: !lambda 'id(gp8403_ch1).set_level(x / 100);'
sensor:
- platform: template
internal: true
id: fan_speed
name: "Fan Speed"
unit_of_measurement: '%'
accuracy_decimals: 0
lambda: !lambda 'return id(dimmer_fan).state;'
update_interval: 5s
- platform: template
internal: true
id: light_level
name: "Light Level"
unit_of_measurement: '%'
accuracy_decimals: 0
lambda: !lambda 'return id(dimmer_light).state;'
update_interval: 5s
light:
- platform: monochromatic
name: "Light: Level"
output: gp8403_ch1
default_transition_length: 0s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment