1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

Add some components to the new testing framework (A part 2) (#6162)

This commit is contained in:
Keith Burzinski
2024-02-06 13:05:04 -06:00
committed by GitHub
parent 164b42f5aa
commit 9dbbc80c74
88 changed files with 2622 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
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()

View File

@@ -0,0 +1,50 @@
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()

View File

@@ -0,0 +1,50 @@
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()

View File

@@ -0,0 +1,50 @@
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()

View File

@@ -0,0 +1,50 @@
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()

View File

@@ -0,0 +1,50 @@
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()