mirror of
https://github.com/esphome/esphome.git
synced 2026-08-31 01:56:01 +00:00
41 lines
942 B
YAML
41 lines
942 B
YAML
esphome:
|
|
on_boot:
|
|
then:
|
|
- globals.set:
|
|
id: glob_int
|
|
value: "10"
|
|
|
|
globals:
|
|
- id: glob_int
|
|
type: int
|
|
restore_value: true
|
|
initial_value: "0"
|
|
update_interval: 5s
|
|
- id: glob_float
|
|
type: float
|
|
restore_value: true
|
|
initial_value: "0.0f"
|
|
- id: glob_bool
|
|
type: bool
|
|
restore_value: false
|
|
initial_value: "true"
|
|
- id: glob_string
|
|
type: std::string
|
|
restore_value: false
|
|
# initial_value: ""
|
|
- id: glob_bool_processed
|
|
type: bool
|
|
restore_value: false
|
|
initial_value: "false"
|
|
# Test restore_value with string "false" - should be converted to bool false
|
|
- id: glob_no_restore_string_false
|
|
type: int
|
|
restore_value: "false"
|
|
initial_value: "42"
|
|
# Test restore_value with string "true" - should be converted to bool true
|
|
- id: glob_restore_string_true
|
|
type: int
|
|
restore_value: "true"
|
|
initial_value: "99"
|
|
update_interval: 5s
|