mirror of
https://github.com/esphome/esphome.git
synced 2024-11-08 09:40:53 +01:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
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: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
# yamllint enable rule:line-length
|
|
args:
|
|
- YESNO(bool_arr[0])
|
|
- bool_arr.size()
|
|
- int_arr[0]
|
|
- int_arr.size()
|
|
- float_arr[0]
|
|
- float_arr.size()
|
|
- string_arr[0].c_str()
|
|
- string_arr.size()
|