Skip to content

Commit

Permalink
add globals in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
heythisisnate committed Nov 12, 2023
1 parent c0a5ff0 commit 4530f04
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 22 deletions.
6 changes: 6 additions & 0 deletions packages/alarm-panel-esp32-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ substitutions:
# CONNECTION MAPPINGS
warning_beep_pin: $out1

#### GLOBALS
globals:
- id: blink_on_state
type: bool
initial_value: $blink_on_state

packages:
remote_package:
url: http://github.com/konnected-io/konnected-esphome
Expand Down
6 changes: 6 additions & 0 deletions packages/alarm-panel-esp8266-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ substitutions:
# CONNECTION MAPPINGS
warning_beep_pin: $out

#### GLOBALS
globals:
- id: blink_on_state
type: bool
initial_value: $blink_on_state

packages:
remote_package:
url: http://github.com/konnected-io/konnected-esphome
Expand Down
20 changes: 20 additions & 0 deletions packages/garage-door-esp32-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,26 @@ substitutions:
sda: GPIO6
scl: GPIO7

#### GLOBALS
globals:
- id: blink_on_state
type: bool
initial_value: $blink_on_state

- id: gdo_err_margin
type: float
restore_value: yes
initial_value: $open_garage_door_distance_margin_of_error

# QC OK means the self-test has passed at least once
- id: qcok
type: bool
restore_value: true

# True when self test is active
- id: self_test
type: bool

packages:

remote_package:
Expand Down
12 changes: 12 additions & 0 deletions packages/garage-door-esp8266-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ substitutions:
scl: GPIO5


#### GLOBALS
globals:
- id: blink_on_state
type: bool
initial_value: $blink_on_state

- id: gdo_err_margin
type: float
restore_value: yes
initial_value: $open_garage_door_distance_margin_of_error


packages:
remote_package:
url: http://github.com/konnected-io/konnected-esphome
Expand Down
11 changes: 0 additions & 11 deletions packages/gdo-self-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ substitutions:
rtttl_scaleup: scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b
rtttl_success: success:d=4,o=6,b=160:8e6,16f6,16g6,8a6,8g6,8e6,8g6,8a6

globals:
# QC OK means the self-test has passed at least once
- id: qcok
type: bool
restore_value: true

# True when self test is active
- id: self_test
type: bool


esphome:
on_boot:
priority: 100
Expand Down
5 changes: 0 additions & 5 deletions packages/status-led.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
globals:
- id: blink_on_state
type: bool
initial_value: $blink_on_state

light:
- platform: status_led
id: blue_status_led
Expand Down
6 changes: 0 additions & 6 deletions packages/vl53l0x-range-sensor.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
globals:
- id: gdo_err_margin
type: float
restore_value: yes
initial_value: $open_garage_door_distance_margin_of_error

i2c:
sda: $sda
scl: $scl
Expand Down

0 comments on commit 4530f04

Please sign in to comment.