2024-05-07 21:33:37 +02:00
|
|
|
esphome:
|
|
|
|
on_boot:
|
|
|
|
then:
|
|
|
|
- homeassistant.event:
|
|
|
|
event: esphome.button_pressed
|
|
|
|
data:
|
|
|
|
message: Button was pressed
|
2024-08-01 12:38:36 +02:00
|
|
|
- homeassistant.action:
|
|
|
|
action: notify.html5
|
2024-05-07 21:33:37 +02:00
|
|
|
data:
|
|
|
|
message: Button was pressed
|
|
|
|
- homeassistant.tag_scanned: pulse
|
|
|
|
|
|
|
|
wifi:
|
|
|
|
ssid: MySSID
|
|
|
|
password: password1
|
|
|
|
|
|
|
|
api:
|
|
|
|
port: 8000
|
|
|
|
password: pwd
|
|
|
|
reboot_timeout: 0min
|
|
|
|
encryption:
|
|
|
|
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
2024-08-01 12:38:36 +02:00
|
|
|
actions:
|
|
|
|
- action: hello_world
|
2024-05-07 21:33:37 +02:00
|
|
|
variables:
|
|
|
|
name: string
|
|
|
|
then:
|
|
|
|
- logger.log:
|
|
|
|
format: Hello World %s!
|
|
|
|
args:
|
|
|
|
- name.c_str()
|
2024-08-01 12:38:36 +02:00
|
|
|
- action: empty_action
|
2024-05-07 21:33:37 +02:00
|
|
|
then:
|
2024-08-01 12:38:36 +02:00
|
|
|
- logger.log: Action Called
|
|
|
|
- action: all_types
|
2024-05-07 21:33:37 +02:00
|
|
|
variables:
|
|
|
|
bool_: bool
|
|
|
|
int_: int
|
|
|
|
float_: float
|
|
|
|
string_: string
|
|
|
|
then:
|
|
|
|
- logger.log: Something happened
|
2024-08-01 12:38:36 +02:00
|
|
|
- action: array_types
|
2024-05-07 21:33:37 +02:00
|
|
|
variables:
|
|
|
|
bool_arr: bool[]
|
|
|
|
int_arr: int[]
|
|
|
|
float_arr: float[]
|
|
|
|
string_arr: string[]
|
|
|
|
then:
|
|
|
|
- logger.log:
|
|
|
|
# yamllint disable rule:line-length
|
2024-06-17 09:18:04 +02:00
|
|
|
format: "Bool: %s (%u), Int: %ld (%u), Float: %f (%u), String: %s (%u)"
|
2024-05-07 21:33:37 +02:00
|
|
|
# yamllint enable rule:line-length
|
|
|
|
args:
|
|
|
|
- YESNO(bool_arr[0])
|
|
|
|
- bool_arr.size()
|
2024-06-17 09:18:04 +02:00
|
|
|
- (long) int_arr[0]
|
2024-05-07 21:33:37 +02:00
|
|
|
- int_arr.size()
|
|
|
|
- float_arr[0]
|
|
|
|
- float_arr.size()
|
|
|
|
- string_arr[0].c_str()
|
|
|
|
- string_arr.size()
|