Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate all YAML configurations but compile just a few #84

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -228,23 +221,13 @@ 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"
echo "::add-matcher::.github/workflows/matchers/python.json"
- 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
2 changes: 1 addition & 1 deletion yeelight_light_ceil26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sensor:
- platform: adc
pin: GPIO35
name: "${name} power supply"
attenuation: 11db
attenuation: 12db

output:
- platform: ledc
Expand Down
4 changes: 2 additions & 2 deletions yeelight_light_ceiling11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions yeelight_light_ceiling15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion yeelight_light_ceiling22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sensor:
- platform: adc
pin: GPIO36
name: "${name} power supply"
attenuation: 11db
attenuation: 12db

output:
- platform: ledc
Expand Down
68 changes: 34 additions & 34 deletions yeelight_light_lamp9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading