Skip to content

Commit

Permalink
Merge branch 'master' into bed-sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegordon authored Nov 16, 2023
2 parents c2a9792 + c454ec0 commit b8f0e89
Show file tree
Hide file tree
Showing 558 changed files with 53,191 additions and 8,772 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"
26 changes: 26 additions & 0 deletions .github/workflows/esphome-dummy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: ESPHome

## This workflow exists to keep branch protection happy in the event of no changes being made to the esphome directory.

# yamllint disable-line rule:truthy
on:
pull_request:
paths-ignore:
- 'esphome/**'
- '.github/workflows/esphome**'
push:
branches: [main]
paths-ignore:
- 'esphome/**'
- '.github/workflows/esphome**'
schedule:
- cron: 0 12 * * *

jobs:
# This is used by branch protections
final:
name: Final ESPHome check
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'
83 changes: 73 additions & 10 deletions .github/workflows/esphome-parallel.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
name: ESPHome Parallel
---
name: ESPHome

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'esphome/**'
- '.github/workflows/esphome**'
push:
branches: [main]
paths:
- 'esphome/**'
- '.github/workflows/esphome**'
schedule:
- cron: 0 12 * * *

jobs:
files: # Job that lists files
Expand All @@ -14,38 +23,92 @@ jobs:
file: ${{ steps.set-files.outputs.file }} # generate output name file by using inner step output
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get list of files
id: set-files # Give it an id to handle to get step outputs in the outputs key above
run: echo "::set-output name=file::$(ls esphome/*.yaml | jq -R -s -c 'split("\n")[:-1]')"
# Define step output named file base on ls command transformed to JSON thanks to jq

loop:
name: Test ESPHome firmware
loop-stable:
name: Test ESPHome Stable firmware
runs-on: ubuntu-latest
needs: [files] # Depends on previous job
strategy:
matrix:
file: ${{fromJson(needs.files.outputs.file)}} # List matrix strategy from files dynamically
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: ESPHome Version
uses: "docker://esphome/esphome:latest"
uses: "docker://esphome/esphome:stable"
with:
args: "version"
- name: Copy stub files into configuration folder
if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }}
run: |
cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml
cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml
- run: echo Compiling ${{matrix.file}}
- run: docker run --rm -v "${PWD}":/config esphome/esphome:latest compile ${{matrix.file}}
- name: Compile all ESPHome ${{matrix.file}}
uses: esphome/build-action@v1
with:
version: stable
yaml_file: ${{matrix.file}}

loop-beta:
name: Test ESPHome Beta firmware
runs-on: ubuntu-latest
needs: [files] # Depends on previous job
strategy:
matrix:
file: ${{fromJson(needs.files.outputs.file)}} # List matrix strategy from files dynamically
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v4
- name: ESPHome Version
uses: "docker://esphome/esphome:beta"
with:
args: "version"
- name: Copy stub files into configuration folder
if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }}
run: |
cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml
cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml
- name: Compile all ESPHome ${{matrix.file}}
uses: esphome/build-action@v1
with:
version: beta
yaml_file: ${{matrix.file}}

loop-dev:
name: Test ESPHome Dev firmware
runs-on: ubuntu-latest
needs: [files] # Depends on previous job
strategy:
matrix:
file: ${{fromJson(needs.files.outputs.file)}} # List matrix strategy from files dynamically
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v4
- name: ESPHome Version
uses: "docker://esphome/esphome:dev"
with:
args: "version"
- name: Copy stub files into configuration folder
if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }}
run: |
cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml
cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml
- name: Compile all ESPHome ${{matrix.file}}
uses: esphome/build-action@v1
with:
version: dev
yaml_file: ${{matrix.file}}

# This is used by branch protections
final:
name: Final ESPHome check
runs-on: ubuntu-latest
needs: [loop]
needs: [loop-stable, loop-beta, loop-dev]
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v4
118 changes: 0 additions & 118 deletions .github/workflows/esphome.yaml.disabled

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Home Assistant CI
name: Home Assistant

# yamllint disable-line rule:truthy
on:
Expand All @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Running YAMLlint
uses: ibiqlik/action-yamllint@v1
uses: ibiqlik/action-yamllint@v3
continue-on-error: false
with:
config_file: .github/yamllint-config.yml
remarklint:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Running Remark lint
uses: "docker://pipelinecomponents/remark-lint:latest"
continue-on-error: false
Expand All @@ -34,7 +34,7 @@ jobs:
needs: [yamllint, remarklint]
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Copy stub files into configuration folder
run: |
cp -R travis_secrets.yaml secrets.yaml
Expand All @@ -55,7 +55,7 @@ jobs:
needs: [yamllint, remarklint]
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Copy stub files into configuration folder
run: |
cp -R travis_secrets.yaml secrets.yaml
Expand All @@ -76,7 +76,7 @@ jobs:
needs: [yamllint, remarklint]
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Copy stub files into configuration folder
run: |
cp -R travis_secrets.yaml secrets.yaml
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/kylegordon/home-assistant-config.svg?branch=master)](https://travis-ci.org/kylegordon/home-assistant-config)
![Home-Assistant](https://github.com/kylegordon/home-assistant-config/actions/workflows/main.yaml/badge.svg)
![ESPHome](https://github.com/kylegordon/home-assistant-config/actions/workflows/esphome-parallel.yaml/badge.svg)


My Home-Assistant configuration.
Expand Down
8 changes: 6 additions & 2 deletions automation/TimedTriggers/alarm_clock_morning.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
alias: "Wakeup transition"
trigger:
- platform: time
at: '06:45:00'
at: '07:15:00'
condition:
- condition: state
entity_id: calendar.holiday_mode
entity_id: binary_sensor.holiday_mode
state: 'off'
- condition: or
conditions:
Expand All @@ -21,6 +22,9 @@ condition:
- wed
- thu
- fri
- condition: numeric_state
entity_id: sensor.average_external_light_level
below: 500
action:
- service: logbook.log
data_template:
Expand Down
15 changes: 0 additions & 15 deletions automation/TimedTriggers/bedtime_on.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions automation/TimedTriggers/turn_off_bedside_lights.yaml

This file was deleted.

Loading

0 comments on commit b8f0e89

Please sign in to comment.