Skip to content

Commit

Permalink
Streamline ESPHome configuration and CI (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Feb 15, 2023
1 parent 06937b8 commit 878034e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ jobs:
pip install esphome
pip list
esphome version
- run: |
- name: Validate example configurations
run: |
sed -i "s#ref: main#ref: pull/${GITHUB_REF_NAME}#" *.yaml
esphome config coordinator-example.yaml
- run: |
esphome config router-example.yaml
esphome-compile:
Expand Down Expand Up @@ -70,7 +71,8 @@ jobs:
run: |
echo "::add-matcher::.github/workflows/matchers/gcc.json"
echo "::add-matcher::.github/workflows/matchers/python.json"
- run: |
- name: Compile example configurations
run: |
sed -i "s#ref: main#ref: pull/${GITHUB_REF_NAME}#" *.yaml
esphome compile coordinator-example.yaml
- run: |
esphome compile router-example.yaml
3 changes: 2 additions & 1 deletion coordinator-example.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
substitutions:
name: zb-gw03-coordinator
device_description: "ZB-GW03 eWeLink Ethernet Zigbee Gateway based Zigbee Coordinator"

packages:
zb-gw03:
Expand All @@ -10,5 +11,5 @@ packages:
- packages/status_led.yaml
- packages/i2c.yaml
- packages/button_zigbee_reset.yaml
- packages/zeroconf.yaml
- packages/mdns.yaml
refresh: 0s
13 changes: 10 additions & 3 deletions packages/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,24 @@ substitutions:

esphome:
name: ${name}
platform: ESP32
board: esp-wrover-kit
comment: ${device_description}
project:
name: "syssi.esphome-zb-gw03"
version: 1.0.0
on_boot:
priority: 600
then:
- switch.turn_off: download_mode
- switch.turn_on: zigbee_reset

esp32:
board: esp-wrover-kit
framework:
type: esp-idf
version: latest

external_components:
- source: github://oxan/esphome-stream-server
- source: github://syssi/esphome-zeroconf@main

ethernet:
type: LAN8720
Expand Down
11 changes: 11 additions & 0 deletions packages/mdns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mdns:
services:
- service: _tube_zb_gw_efr32
protocol: _tcp
port: 6638
txt:
name: ZB-GW03
version: 1.0
radio_type: ezsp
baud_rate: 115200
data_flow_control: software
9 changes: 0 additions & 9 deletions packages/zeroconf.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion router-example.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
substitutions:
name: zb-gw03-coordinator
name: zb-gw03-router
device_description: "ZB-GW03 eWeLink Ethernet Zigbee Gateway based Zigbee Router"

packages:
zb-gw03:
Expand Down

0 comments on commit 878034e

Please sign in to comment.