Compare commits

...

9 Commits

Author SHA1 Message Date
GitHub Actions
ec528ec128 Bump version to 2024.12.12 [skip-versioning] 2024-12-23 17:52:46 +00:00
Edward Firmo
4ed98e533f Merge pull request #62 from edwardtfn/test-only-on-pull
Run test only on pull request or push to main
2024-12-23 18:52:35 +01:00
Edward Firmo
1ef73d5cd0 Remove paths-ignore 2024-12-23 18:49:50 +01:00
Edward Firmo
420225b6ba Run test only on pull request or push to main 2024-12-23 18:47:41 +01:00
GitHub Actions
8996cfbdf8 Bump version to 2024.12.11 [skip-versioning] 2024-12-23 17:39:57 +00:00
Edward Firmo
085250c471 Merge pull request #61 from edwardtfn/light-restore-state-on-boot
Restore light state on boot
2024-12-23 18:39:47 +01:00
Edward Firmo
6230e31323 Fix inconsistent restore mode variable usage
As suggested by CodeRabbitAI
2024-12-23 18:34:05 +01:00
Edward Firmo
248f7e9cd8 Use substitutions instead 2024-12-23 18:28:58 +01:00
Edward Firmo
6343e6eb4a Restore light state on boot
Trying to solve #47
2024-12-23 18:21:32 +01:00
6 changed files with 24 additions and 9 deletions

View File

@@ -1,8 +1,7 @@
--- ---
name: Validate ESPHome name: Validate ESPHome (Latest)
# yamllint disable-line rule:truthy on: # yamllint disable-line rule:truthy
on:
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
@@ -37,6 +36,7 @@ jobs:
uses: esphome/build-action@main uses: esphome/build-action@main
with: with:
yaml-file: ".test/esphome_ard_basic.yaml" yaml-file: ".test/esphome_ard_basic.yaml"
version: latest
build_bluetooth_proxy_4: build_bluetooth_proxy_4:
name: Bluetooth Proxy (IDF) name: Bluetooth Proxy (IDF)
@@ -47,6 +47,7 @@ jobs:
uses: esphome/build-action@main uses: esphome/build-action@main
with: with:
yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml" yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml"
version: latest
build_bluetooth_proxy_53: build_bluetooth_proxy_53:
name: Bluetooth Proxy (IDF v5.3) name: Bluetooth Proxy (IDF v5.3)
@@ -57,4 +58,5 @@ jobs:
uses: esphome/build-action@main uses: esphome/build-action@main
with: with:
yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml" yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml"
version: latest
... ...

View File

@@ -11,6 +11,8 @@ on: # yamllint disable-line rule:truthy
- "*.c" - "*.c"
- "*.cpp" - "*.cpp"
- "*.py" - "*.py"
branches:
- main
pull_request: pull_request:
paths: paths:
- "*.yaml" - "*.yaml"

View File

@@ -25,6 +25,11 @@ substitutions:
LIGHT_TRANSITION_TURN_OFF: '0' # Transition time in msec LIGHT_TRANSITION_TURN_OFF: '0' # Transition time in msec
LIGHT_BRIGHTNESS_TURN_ON: '0' # Brightness (1 to 100%, 0 to not set it) LIGHT_BRIGHTNESS_TURN_ON: '0' # Brightness (1 to 100%, 0 to not set it)
LIGHT_FULL_RESTORE_MODE: RESTORE_DEFAULT_OFF
LIGHT_SIDES_RESTORE_MODE: RESTORE_DEFAULT_OFF
LIGHT_INDIVIDUAL_RESTORE_MODE: RESTORE_DEFAULT_OFF
LIGHT_RELAYS_RESTORE_MODE: RESTORE_DEFAULT_OFF
globals: globals:
- id: gb_lights_1 - id: gb_lights_1
type: std::vector<light::LightState*> type: std::vector<light::LightState*>
@@ -44,6 +49,7 @@ light:
# method: esp32_rmt # method: esp32_rmt
num_leds: 32 num_leds: 32
pin: GPIO13 pin: GPIO13
restore_mode: ${LIGHT_FULL_RESTORE_MODE}
# Those lights are available based on the model selections # Those lights are available based on the model selections
- &light_partition_with_effects - &light_partition_with_effects
@@ -52,6 +58,7 @@ light:
platform: partition platform: partition
default_transition_length: ${default_transition_length} default_transition_length: ${default_transition_length}
internal: true internal: true
restore_mode: ${LIGHT_SIDES_RESTORE_MODE}
effects: effects:
- addressable_rainbow: - addressable_rainbow:
name: "Rainbow" name: "Rainbow"
@@ -184,6 +191,7 @@ light:
platform: partition platform: partition
disabled_by_default: true disabled_by_default: true
default_transition_length: ${default_transition_length} default_transition_length: ${default_transition_length}
restore_mode: ${LIGHT_INDIVIDUAL_RESTORE_MODE}
segments: segments:
- id: light_full - id: light_full
from: 0 from: 0
@@ -417,6 +425,7 @@ light:
platform: partition platform: partition
internal: true internal: true
default_transition_length: ${default_transition_length} default_transition_length: ${default_transition_length}
restore_mode: ${LIGHT_RELAYS_RESTORE_MODE}
segments: segments:
- id: light_full - id: light_full
from: 9 from: 9

View File

@@ -15,6 +15,7 @@ substitutions:
RELAY_MODE_TEXT_SWITCH: "Switch" RELAY_MODE_TEXT_SWITCH: "Switch"
RELAY_MODE_TEXT_LIGHT: "Light" RELAY_MODE_TEXT_LIGHT: "Light"
RELAY_MODE_TEXT_NOT_USED: "Not in use" RELAY_MODE_TEXT_NOT_USED: "Not in use"
RELAY_RESTORE_MODE: RESTORE_DEFAULT_OFF
globals: globals:
- id: boot_initialization_relays - id: boot_initialization_relays
@@ -29,6 +30,7 @@ light:
output: output_relay_1 output: output_relay_1
platform: binary platform: binary
internal: true internal: true
restore_mode: ${RELAY_RESTORE_MODE}
on_turn_on: on_turn_on:
then: then:
- if: - if:
@@ -349,7 +351,7 @@ switch:
name: Relay 1 name: Relay 1
output: output_relay_1 output: output_relay_1
platform: output platform: output
restore_mode: RESTORE_DEFAULT_OFF restore_mode: ${RELAY_RESTORE_MODE}
internal: true internal: true
on_turn_on: on_turn_on:
then: then:
@@ -372,7 +374,7 @@ switch:
name: Relay 2 name: Relay 2
output: output_relay_2 output: output_relay_2
platform: output platform: output
restore_mode: RESTORE_DEFAULT_OFF restore_mode: ${RELAY_RESTORE_MODE}
internal: true internal: true
on_turn_on: on_turn_on:
then: then:
@@ -395,7 +397,7 @@ switch:
name: Relay 3 name: Relay 3
output: output_relay_3 output: output_relay_3
platform: output platform: output
restore_mode: RESTORE_DEFAULT_OFF restore_mode: ${RELAY_RESTORE_MODE}
internal: true internal: true
on_turn_on: on_turn_on:
then: then:
@@ -418,7 +420,7 @@ switch:
name: Relay 4 name: Relay 4
output: output_relay_4 output: output_relay_4
platform: output platform: output
restore_mode: RESTORE_DEFAULT_OFF restore_mode: ${RELAY_RESTORE_MODE}
internal: true internal: true
on_turn_on: on_turn_on:
then: then:

View File

@@ -1 +1 @@
2024.12.10 2024.12.12

View File

@@ -1 +1 @@
version: 2024.12.10 version: 2024.12.12