Use substitutions instead
This commit is contained in:
@@ -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,7 +49,7 @@ light:
|
|||||||
# method: esp32_rmt
|
# method: esp32_rmt
|
||||||
num_leds: 32
|
num_leds: 32
|
||||||
pin: GPIO13
|
pin: GPIO13
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
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
|
||||||
@@ -53,7 +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: RESTORE_DEFAULT_OFF
|
restore_mode: ${LIGHT_SIDES_RESTORE_MODE}
|
||||||
effects:
|
effects:
|
||||||
- addressable_rainbow:
|
- addressable_rainbow:
|
||||||
name: "Rainbow"
|
name: "Rainbow"
|
||||||
@@ -186,8 +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: RESTORE_DEFAULT_OFF
|
restore_mode: ${LIGHT_FULL_RESTORE_MODE}
|
||||||
|
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 0
|
from: 0
|
||||||
@@ -421,7 +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: RESTORE_DEFAULT_OFF
|
restore_mode: ${LIGHT_RELAYS_RESTORE_MODE}
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 9
|
from: 9
|
||||||
|
|||||||
@@ -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,7 +30,7 @@ light:
|
|||||||
output: output_relay_1
|
output: output_relay_1
|
||||||
platform: binary
|
platform: binary
|
||||||
internal: true
|
internal: true
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: ${RELAY_RESTORE_MODE}
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
@@ -350,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:
|
||||||
@@ -373,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:
|
||||||
@@ -396,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:
|
||||||
@@ -419,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:
|
||||||
|
|||||||
Reference in New Issue
Block a user