mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 10:44:13 +01:00
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
esphome:
|
|
on_boot:
|
|
then:
|
|
- homeassistant.event:
|
|
event: esphome.button_pressed
|
|
data:
|
|
message: Button was pressed
|
|
- homeassistant.action:
|
|
action: notify.html5
|
|
data:
|
|
message: Button was pressed
|
|
- homeassistant.tag_scanned: pulse
|
|
|
|
api:
|
|
port: 8000
|
|
password: pwd
|
|
reboot_timeout: 0min
|
|
encryption:
|
|
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
actions:
|
|
- action: hello_world
|
|
variables:
|
|
name: string
|
|
then:
|
|
- logger.log:
|
|
format: Hello World %s!
|
|
args:
|
|
- name.c_str()
|
|
- action: empty_action
|
|
then:
|
|
- logger.log: Action Called
|
|
- action: all_types
|
|
variables:
|
|
bool_: bool
|
|
int_: int
|
|
float_: float
|
|
string_: string
|
|
then:
|
|
- logger.log: Something happened
|
|
- action: array_types
|
|
variables:
|
|
bool_arr: bool[]
|
|
int_arr: int[]
|
|
float_arr: float[]
|
|
string_arr: string[]
|
|
then:
|
|
- logger.log:
|
|
# yamllint disable rule:line-length
|
|
format: "Bool: %s (%u), Int: %ld (%u), Float: %f (%u), String: %s (%u)"
|
|
# yamllint enable rule:line-length
|
|
args:
|
|
- YESNO(bool_arr[0])
|
|
- bool_arr.size()
|
|
- (long) int_arr[0]
|
|
- int_arr.size()
|
|
- float_arr[0]
|
|
- float_arr.size()
|
|
- string_arr[0].c_str()
|
|
- string_arr.size()
|