mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +01:00
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
esphome:
|
|
on_boot:
|
|
then:
|
|
- homeassistant.event:
|
|
event: esphome.button_pressed
|
|
data:
|
|
message: Button was pressed
|
|
- homeassistant.service:
|
|
service: notify.html5
|
|
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=
|
|
services:
|
|
- service: hello_world
|
|
variables:
|
|
name: string
|
|
then:
|
|
- logger.log:
|
|
format: Hello World %s!
|
|
args:
|
|
- name.c_str()
|
|
- service: empty_service
|
|
then:
|
|
- logger.log: Service Called
|
|
- service: all_types
|
|
variables:
|
|
bool_: bool
|
|
int_: int
|
|
float_: float
|
|
string_: string
|
|
then:
|
|
- logger.log: Something happened
|
|
- service: 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()
|