diff --git a/packages/gp8403.yaml b/packages/gp8403.yaml index effa8374b9621eaca9ed563ff980983951c61183..bc45b687aa44841b0940a792638fee1e200f8f46 100644 --- a/packages/gp8403.yaml +++ b/packages/gp8403.yaml @@ -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