diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 65c3ebe..a3212e5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -189,14 +189,7 @@ jobs: - name: Write secrets.yaml shell: bash run: 'echo -e "wifi_ssid: ssid\nwifi_password: password" > secrets.yaml' - - run: esphome config yeelight_light_ceil26.yaml - - run: esphome config yeelight_light_ceiling10.yaml - - run: esphome config yeelight_light_ceiling11.yaml - - run: esphome config yeelight_light_ceiling15.yaml - - run: esphome config yeelight_light_ceiling20.yaml - - run: esphome config yeelight_light_ceilb.yaml - - run: esphome config yeelight_light_ceilc.yaml - - run: esphome -s external_components_source components config yeelight_light_strip6.yaml + - run: esphome config yeelight_*.yaml - run: esphome -s external_components_source components config yeerc_ylyk01yl.yaml - run: esphome -s external_components_source components config yeerc_ylyk01yl_fancl.yaml @@ -228,8 +221,6 @@ jobs: pip install esphome pip list esphome version - # Downgrade cryptography to avoid https://github.com/espressif/esp-idf/issues/7631 - python -m pip install --upgrade cryptography==3.4.8 - name: Register problem matchers run: | echo "::add-matcher::.github/workflows/matchers/gcc.json" @@ -237,14 +228,6 @@ jobs: - name: Write secrets.yaml shell: bash run: 'echo -e "wifi_ssid: ssid\nwifi_password: password" > secrets.yaml' - - run: esphome compile yeelight_light_ceil26.yaml - - run: esphome compile yeelight_light_ceiling10.yaml - - run: esphome compile yeelight_light_ceiling11.yaml - - run: esphome compile yeelight_light_ceiling15.yaml - - run: esphome compile yeelight_light_ceiling20.yaml - - run: esphome compile yeelight_light_ceilb.yaml - - run: esphome compile yeelight_light_ceilc.yaml - - run: esphome compile yeelight_light_strip6.yaml - - run: esphome -s external_components_source components compile yeelight_light_fancl5.yaml + # Compile only a few examples as they are all very similar + - run: esphome -s external_components_source components compile yeelight_light_lamp9.yaml - run: esphome -s external_components_source components compile yeerc_ylyk01yl.yaml - # - run: esphome -s external_components_source components compile yeerc_ylyk01yl_fancl.yaml diff --git a/yeelight_light_ceil26.yaml b/yeelight_light_ceil26.yaml index 6511ec6..1b6c585 100644 --- a/yeelight_light_ceil26.yaml +++ b/yeelight_light_ceil26.yaml @@ -30,7 +30,7 @@ sensor: - platform: adc pin: GPIO35 name: "${name} power supply" - attenuation: 11db + attenuation: 12db output: - platform: ledc diff --git a/yeelight_light_ceiling11.yaml b/yeelight_light_ceiling11.yaml index c106909..04a6394 100644 --- a/yeelight_light_ceiling11.yaml +++ b/yeelight_light_ceiling11.yaml @@ -34,11 +34,11 @@ sensor: - platform: adc pin: GPIO36 name: "${name} adc1" - attenuation: 11db + attenuation: 12db - platform: adc pin: GPIO32 name: "${name} adc2" - attenuation: 11db + attenuation: 12db output: - platform: ledc diff --git a/yeelight_light_ceiling15.yaml b/yeelight_light_ceiling15.yaml index fe7cc6a..b375f94 100644 --- a/yeelight_light_ceiling15.yaml +++ b/yeelight_light_ceiling15.yaml @@ -30,11 +30,11 @@ sensor: - platform: adc pin: GPIO36 name: "${name} adc1" - attenuation: 11db + attenuation: 12db - platform: adc pin: GPIO32 name: "${name} adc2" - attenuation: 11db + attenuation: 12db output: - platform: ledc diff --git a/yeelight_light_ceiling22.yaml b/yeelight_light_ceiling22.yaml index e19a165..6a18986 100644 --- a/yeelight_light_ceiling22.yaml +++ b/yeelight_light_ceiling22.yaml @@ -30,7 +30,7 @@ sensor: - platform: adc pin: GPIO36 name: "${name} power supply" - attenuation: 11db + attenuation: 12db output: - platform: ledc diff --git a/yeelight_light_lamp9.yaml b/yeelight_light_lamp9.yaml index 3899947..c72f0e7 100644 --- a/yeelight_light_lamp9.yaml +++ b/yeelight_light_lamp9.yaml @@ -36,43 +36,43 @@ binary_sensor: on_click: then: - if: - condition: - light.is_off: bedside_light - then: - light.turn_on: - id: bedside_light - brightness: 1.0 - else: - light.turn_off: bedside_light + condition: + light.is_off: bedside_light + then: + light.turn_on: + id: bedside_light + brightness: 1.0 + else: + light.turn_off: bedside_light on_press: then: - if: - condition: - light.is_off: bedside_light - then: - - delay: 0.5s - - while: - condition: - binary_sensor.is_on: button - then: - - light.dim_relative: - id: bedside_light - relative_brightness: 5% - transition_length: 0.1s - - delay: 0.1s - else: - - delay: 0.5s - - while: - condition: - and: - - binary_sensor.is_on: button - - light.is_on: bedside_light - then: - - light.dim_relative: - id: bedside_light - relative_brightness: -5% - transition_length: 0.1s - - delay: 0.1s + condition: + light.is_off: bedside_light + then: + - delay: 0.5s + - while: + condition: + binary_sensor.is_on: button + then: + - light.dim_relative: + id: bedside_light + relative_brightness: 5% + transition_length: 0.1s + - delay: 0.1s + else: + - delay: 0.5s + - while: + condition: + and: + - binary_sensor.is_on: button + - light.is_on: bedside_light + then: + - light.dim_relative: + id: bedside_light + relative_brightness: -5% + transition_length: 0.1s + - delay: 0.1s output: - platform: ledc