Untitled
unknown
plain_text
4 years ago
2.9 kB
3
Indexable
output: - platform: esp32_dac pin: GPIO25 id: ada_analog25 min_power: 0.00 max_power: 1.00 - platform: esp32_dac pin: GPIO26 id: ada_analog26 min_power: 0.00 max_power: 0.90 light: - platform: monochromatic output: ada_analog25 name: "Ada Mätare 1" gamma_correct: 0 id: dac_light1 # id: rotary_encoder1 - platform: monochromatic output: ada_analog26 name: "Ada Mätare 2" gamma_correct: 1.40 id: dac_light2 binary_sensor: # - platform: gpio # id: ada_brytare1 # pin: # number: GPIO27 # mode: INPUT_PULLUP # name: "Ada_Brytare 1" # on_click: # then: # - if: # condition: # light.is_off: dac_light1 # then: # light.turn_on: # id: dac_light1 # brightness: 1.0 # else: # light.turn_off: dac_light1 # on_press: # then: # - if: # condition: # light.is_off: dac_light1 # then: # - delay: 0.5s # - while: # condition: # binary_sensor.is_on: ada_brytare1 # then: # - light.dim_relative: # id: dac_light1 # relative_brightness: 1% # transition_length: 0.1s # - delay: 0.2s # else: # - delay: 0.5s # - while: # condition: # and: # - binary_sensor.is_on: ada_brytare1 # - light.is_on: dac_light1 # then: # - light.dim_relative: # id: dac_light1 # relative_brightness: -1% # transition_length: 0.1s # - delay: 0.2s ### Slut - platform: gpio id: ada_brytare2 pin: number: GPIO14 mode: INPUT_PULLUP name: "Ada_Brytare 2" #status_led: # pin: # number: GPIO16 # inverted: yes sensor: - platform: wifi_signal name: "Adas ESP Wifi" update_interval: 60s - platform: uptime name: "Ada Esp Uptime" # Example configuration entry - platform: rotary_encoder name: "rotary_Encoder1" id: rotary_encoder1 pin_a: GPIO2 pin_b: GPIO15 max_value: 100 min_value: 0 filters: - or: - debounce: 0.05s - delta: 1 on_value: then: - homeassistant.service: service: light.turn_on data_template: entity_id: light.ada_matare_1 brightness_pct: "{{ brightness_1 | int }}" variables: brightness_1: !lambda 'return id(rotary_encoder1).state * 1;' text_sensor: - platform: version name: "Ada ESPHome version" switch: - platform: gpio pin: GPIO2 name: Ada1 # inverted: yes
Editor is loading...