mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Merge branch 'dev' into nvds-new-espnow
This commit is contained in:
@@ -5,24 +5,20 @@ esphome:
|
||||
event: esphome.button_pressed
|
||||
data:
|
||||
message: Button was pressed
|
||||
- homeassistant.service:
|
||||
service: notify.html5
|
||||
- homeassistant.action:
|
||||
action: 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
|
||||
actions:
|
||||
- action: hello_world
|
||||
variables:
|
||||
name: string
|
||||
then:
|
||||
@@ -30,10 +26,10 @@ api:
|
||||
format: Hello World %s!
|
||||
args:
|
||||
- name.c_str()
|
||||
- service: empty_service
|
||||
- action: empty_action
|
||||
then:
|
||||
- logger.log: Service Called
|
||||
- service: all_types
|
||||
- logger.log: Action Called
|
||||
- action: all_types
|
||||
variables:
|
||||
bool_: bool
|
||||
int_: int
|
||||
@@ -41,7 +37,7 @@ api:
|
||||
string_: string
|
||||
then:
|
||||
- logger.log: Something happened
|
||||
- service: array_types
|
||||
- action: array_types
|
||||
variables:
|
||||
bool_arr: bool[]
|
||||
int_arr: int[]
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
3
tests/components/api/test.host.yaml
Normal file
3
tests/components/api/test.host.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
network:
|
||||
@@ -1 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
@@ -7,6 +7,7 @@ spi:
|
||||
sensor:
|
||||
- platform: atm90e32
|
||||
cs_pin: 13
|
||||
id: chip1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
@@ -49,3 +50,11 @@ sensor:
|
||||
line_frequency: 60Hz
|
||||
current_phases: 3
|
||||
gain_pga: 2X
|
||||
enable_offset_calibration: True
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: chip1
|
||||
run_offset_calibration:
|
||||
name: "Chip1 - Run Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Chip1 - Clear Offset Calibration"
|
||||
|
||||
@@ -7,6 +7,7 @@ spi:
|
||||
sensor:
|
||||
- platform: atm90e32
|
||||
cs_pin: 8
|
||||
id: chip1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
@@ -49,3 +50,11 @@ sensor:
|
||||
line_frequency: 60Hz
|
||||
current_phases: 3
|
||||
gain_pga: 2X
|
||||
enable_offset_calibration: True
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: chip1
|
||||
run_offset_calibration:
|
||||
name: "Chip1 - Run Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Chip1 - Clear Offset Calibration"
|
||||
|
||||
@@ -7,6 +7,7 @@ spi:
|
||||
sensor:
|
||||
- platform: atm90e32
|
||||
cs_pin: 8
|
||||
id: chip1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
@@ -49,3 +50,11 @@ sensor:
|
||||
line_frequency: 60Hz
|
||||
current_phases: 3
|
||||
gain_pga: 2X
|
||||
enable_offset_calibration: True
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: chip1
|
||||
run_offset_calibration:
|
||||
name: "Chip1 - Run Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Chip1 - Clear Offset Calibration"
|
||||
|
||||
@@ -7,6 +7,7 @@ spi:
|
||||
sensor:
|
||||
- platform: atm90e32
|
||||
cs_pin: 13
|
||||
id: chip1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
@@ -49,3 +50,11 @@ sensor:
|
||||
line_frequency: 60Hz
|
||||
current_phases: 3
|
||||
gain_pga: 2X
|
||||
enable_offset_calibration: True
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: chip1
|
||||
run_offset_calibration:
|
||||
name: "Chip1 - Run Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Chip1 - Clear Offset Calibration"
|
||||
|
||||
@@ -7,6 +7,7 @@ spi:
|
||||
sensor:
|
||||
- platform: atm90e32
|
||||
cs_pin: 5
|
||||
id: chip1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
@@ -49,3 +50,42 @@ sensor:
|
||||
line_frequency: 60Hz
|
||||
current_phases: 3
|
||||
gain_pga: 2X
|
||||
enable_offset_calibration: True
|
||||
- platform: atm90e32
|
||||
cs_pin: 4
|
||||
id: chip2
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
current:
|
||||
name: EMON CT1 Current
|
||||
power:
|
||||
name: EMON Active Power CT1
|
||||
reactive_power:
|
||||
name: EMON Reactive Power CT1
|
||||
power_factor:
|
||||
name: EMON Power Factor CT1
|
||||
gain_voltage: 7305
|
||||
gain_ct: 27961
|
||||
phase_c:
|
||||
voltage:
|
||||
name: EMON Line Voltage C
|
||||
current:
|
||||
name: EMON CT2 Current
|
||||
power:
|
||||
name: EMON Active Power CT2
|
||||
reactive_power:
|
||||
name: EMON Reactive Power CT2
|
||||
power_factor:
|
||||
name: EMON Power Factor CT2
|
||||
gain_voltage: 7305
|
||||
gain_ct: 27961
|
||||
line_frequency: 60Hz
|
||||
current_phases: 2
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: chip1
|
||||
run_offset_calibration:
|
||||
name: "Chip1 - Run Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Chip1 - Clear Offset Calibration"
|
||||
|
||||
@@ -7,6 +7,7 @@ spi:
|
||||
sensor:
|
||||
- platform: atm90e32
|
||||
cs_pin: 5
|
||||
id: chip1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: EMON Line Voltage A
|
||||
@@ -49,3 +50,11 @@ sensor:
|
||||
line_frequency: 60Hz
|
||||
current_phases: 3
|
||||
gain_pga: 2X
|
||||
enable_offset_calibration: True
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: chip1
|
||||
run_offset_calibration:
|
||||
name: "Chip1 - Run Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Chip1 - Clear Offset Calibration"
|
||||
|
||||
34
tests/components/bme68x_bsec2_i2c/common.yaml
Normal file
34
tests/components/bme68x_bsec2_i2c/common.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
i2c:
|
||||
- id: i2c_bme68x
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
bme68x_bsec2_i2c:
|
||||
address: 0x76
|
||||
model: bme688
|
||||
algorithm_output: classification
|
||||
operating_age: 28d
|
||||
sample_rate: LP
|
||||
supply_voltage: 3.3V
|
||||
|
||||
sensor:
|
||||
- platform: bme68x_bsec2
|
||||
temperature:
|
||||
name: BME68X Temperature
|
||||
pressure:
|
||||
name: BME68X Pressure
|
||||
humidity:
|
||||
name: BME68X Humidity
|
||||
gas_resistance:
|
||||
name: BME68X Gas Sensor
|
||||
iaq:
|
||||
name: BME68X IAQ
|
||||
co2_equivalent:
|
||||
name: BME68X eCO2
|
||||
breath_voc_equivalent:
|
||||
name: BME68X Breath eVOC
|
||||
|
||||
text_sensor:
|
||||
- platform: bme68x_bsec2
|
||||
iaq_accuracy:
|
||||
name: BME68X Accuracy
|
||||
5
tests/components/bme68x_bsec2_i2c/test.esp32-ard.yaml
Normal file
5
tests/components/bme68x_bsec2_i2c/test.esp32-ard.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
<<: !include common.yaml
|
||||
5
tests/components/bme68x_bsec2_i2c/test.esp32-c3-ard.yaml
Normal file
5
tests/components/bme68x_bsec2_i2c/test.esp32-c3-ard.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO6
|
||||
sda_pin: GPIO7
|
||||
|
||||
<<: !include common.yaml
|
||||
5
tests/components/bme68x_bsec2_i2c/test.esp32-s2-ard.yaml
Normal file
5
tests/components/bme68x_bsec2_i2c/test.esp32-s2-ard.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
<<: !include common.yaml
|
||||
5
tests/components/bme68x_bsec2_i2c/test.esp32-s3-ard.yaml
Normal file
5
tests/components/bme68x_bsec2_i2c/test.esp32-s3-ard.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
<<: !include common.yaml
|
||||
5
tests/components/bme68x_bsec2_i2c/test.esp8266-ard.yaml
Normal file
5
tests/components/bme68x_bsec2_i2c/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -13,12 +13,12 @@ esphome:
|
||||
message: The humidity is {{ my_variable }}%.
|
||||
variables:
|
||||
my_variable: "return id(ha_hello_world_temperature).state;"
|
||||
- homeassistant.service:
|
||||
service: notify.html5
|
||||
- homeassistant.action:
|
||||
action: notify.html5
|
||||
data:
|
||||
message: Button was pressed
|
||||
- homeassistant.service:
|
||||
service: notify.html5
|
||||
- homeassistant.action:
|
||||
action: notify.html5
|
||||
data:
|
||||
title: New Humidity
|
||||
data_template:
|
||||
@@ -32,6 +32,11 @@ wifi:
|
||||
|
||||
api:
|
||||
|
||||
switch:
|
||||
- platform: homeassistant
|
||||
entity_id: switch.my_cool_switch
|
||||
id: my_cool_switch
|
||||
|
||||
binary_sensor:
|
||||
- platform: homeassistant
|
||||
entity_id: binary_sensor.hello_world
|
||||
@@ -41,6 +46,11 @@ binary_sensor:
|
||||
attribute: world
|
||||
id: ha_hello_world_binary_attribute
|
||||
|
||||
number:
|
||||
- platform: homeassistant
|
||||
entity_id: number.hello_world
|
||||
id: ha_hello_world_number
|
||||
|
||||
sensor:
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.hello_world
|
||||
|
||||
@@ -15,6 +15,8 @@ esphome:
|
||||
- light.dim_relative:
|
||||
id: test_monochromatic_light
|
||||
relative_brightness: 5%
|
||||
brightness_limits:
|
||||
max_brightness: 90%
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
|
||||
@@ -15,6 +15,8 @@ esphome:
|
||||
- light.dim_relative:
|
||||
id: test_monochromatic_light
|
||||
relative_brightness: 5%
|
||||
brightness_limits:
|
||||
max_brightness: 90%
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
|
||||
@@ -15,6 +15,8 @@ esphome:
|
||||
- light.dim_relative:
|
||||
id: test_monochromatic_light
|
||||
relative_brightness: 5%
|
||||
brightness_limits:
|
||||
max_brightness: 90%
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
|
||||
@@ -15,6 +15,8 @@ esphome:
|
||||
- light.dim_relative:
|
||||
id: test_monochromatic_light
|
||||
relative_brightness: 5%
|
||||
brightness_limits:
|
||||
max_brightness: 90%
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
|
||||
@@ -15,6 +15,8 @@ esphome:
|
||||
- light.dim_relative:
|
||||
id: test_monochromatic_light
|
||||
relative_brightness: 5%
|
||||
brightness_limits:
|
||||
max_brightness: 90%
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
|
||||
@@ -15,6 +15,8 @@ esphome:
|
||||
- light.dim_relative:
|
||||
id: test_monochromatic_light
|
||||
relative_brightness: 5%
|
||||
brightness_limits:
|
||||
max_brightness: 90%
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
|
||||
2
tests/components/lvgl/.gitattributes
vendored
Normal file
2
tests/components/lvgl/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.ttf -text
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
touchscreen:
|
||||
- platform: ft63x6
|
||||
id: tft_touch
|
||||
display: tft_display
|
||||
update_interval: 50ms
|
||||
threshold: 1
|
||||
calibration:
|
||||
x_max: 240
|
||||
y_max: 320
|
||||
|
||||
font:
|
||||
- file: "$component_dir/roboto.ttf"
|
||||
id: roboto20
|
||||
size: 20
|
||||
extras:
|
||||
- file: '$component_dir/materialdesignicons-webfont.ttf'
|
||||
glyphs: [
|
||||
"\U000F004B",
|
||||
"\U0000f0ed",
|
||||
"\U000F006E",
|
||||
"\U000F012C",
|
||||
"\U000F179B",
|
||||
"\U000F0748",
|
||||
"\U000F1A1B",
|
||||
"\U000F02DC",
|
||||
"\U000F0A02",
|
||||
"\U000F035F",
|
||||
"\U000F0156",
|
||||
"\U000F0C5F",
|
||||
"\U000f0084",
|
||||
"\U000f0091",
|
||||
]
|
||||
- file: "$component_dir/helvetica.ttf"
|
||||
id: helvetica20
|
||||
- file: "$component_dir/roboto.ttf"
|
||||
id: roboto10
|
||||
size: 10
|
||||
bpp: 4
|
||||
extras:
|
||||
- file: '$component_dir/materialdesignicons-webfont.ttf'
|
||||
glyphs: [
|
||||
"\U000F004B",
|
||||
"\U0000f0ed",
|
||||
"\U000F006E",
|
||||
"\U000F012C",
|
||||
"\U000F179B",
|
||||
"\U000F0748",
|
||||
"\U000F1A1B",
|
||||
"\U000F02DC",
|
||||
"\U000F0A02",
|
||||
"\U000F035F",
|
||||
"\U000F0156",
|
||||
"\U000F0C5F",
|
||||
"\U000f0084",
|
||||
"\U000f0091",
|
||||
]
|
||||
|
||||
sensor:
|
||||
- platform: lvgl
|
||||
id: lvgl_sensor_id
|
||||
name: "LVGL Arc Sensor"
|
||||
widget: lv_arc
|
||||
- platform: lvgl
|
||||
widget: slider_id
|
||||
name: LVGL Slider
|
||||
- platform: lvgl
|
||||
widget: bar_id
|
||||
id: lvgl_bar_sensor
|
||||
name: LVGL Bar
|
||||
- platform: lvgl
|
||||
widget: spinbox_id
|
||||
name: LVGL Spinbox
|
||||
|
||||
number:
|
||||
- platform: lvgl
|
||||
widget: slider_id
|
||||
name: LVGL Slider
|
||||
update_on_release: true
|
||||
- platform: lvgl
|
||||
widget: lv_arc
|
||||
id: lvgl_arc_number
|
||||
name: LVGL Arc
|
||||
- platform: lvgl
|
||||
widget: bar_id
|
||||
id: lvgl_bar_number
|
||||
name: LVGL Bar
|
||||
- platform: lvgl
|
||||
widget: spinbox_id
|
||||
id: lvgl_spinbox_number
|
||||
name: LVGL Spinbox
|
||||
|
||||
light:
|
||||
- platform: lvgl
|
||||
name: LVGL LED
|
||||
id: lv_light
|
||||
led: lv_led
|
||||
|
||||
binary_sensor:
|
||||
- platform: lvgl
|
||||
id: lvgl_pressbutton
|
||||
name: Pressbutton
|
||||
widget: spin_up
|
||||
publish_initial_state: true
|
||||
- platform: lvgl
|
||||
name: ButtonMatrix button
|
||||
widget: button_a
|
||||
- platform: lvgl
|
||||
id: switch_d
|
||||
name: Matrix switch D
|
||||
widget: button_d
|
||||
on_click:
|
||||
then:
|
||||
- lvgl.page.previous:
|
||||
animation: move_right
|
||||
time: 600ms
|
||||
- platform: lvgl
|
||||
id: button_checker
|
||||
name: LVGL button
|
||||
widget: spin_up
|
||||
on_state:
|
||||
then:
|
||||
- lvgl.checkbox.update:
|
||||
id: checkbox_id
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
text: Unchecked
|
||||
- platform: lvgl
|
||||
name: LVGL checkbox
|
||||
widget: checkbox_id
|
||||
|
||||
wifi:
|
||||
ssid: SSID
|
||||
password: PASSWORD123
|
||||
|
||||
time:
|
||||
platform: sntp
|
||||
id: time_id
|
||||
|
||||
BIN
tests/components/lvgl/helvetica.ttf
Normal file
BIN
tests/components/lvgl/helvetica.ttf
Normal file
Binary file not shown.
25
tests/components/lvgl/logo-text.svg
Normal file
25
tests/components/lvgl/logo-text.svg
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 596.64 116.88">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #1d2126;
|
||||
stroke-width: 0px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Layer_1-2" data-name="Layer 1">
|
||||
<g>
|
||||
<g>
|
||||
<path class="cls-1" d="M211.37,84.7v11.25h-43.5V25.87h43.5v11.34h-31.59v18.14h28.22v10.55h-28.22v18.8h31.59Z"/>
|
||||
<path class="cls-1" d="M245.41,24.6c6.41,0,11.73,1.56,15.98,4.69,4.25,3.12,6.86,7.3,7.83,12.52l-11.2,3.05c-.63-3-2.09-5.31-4.38-6.94-2.3-1.62-5.13-2.44-8.51-2.44-3.63,0-6.5.87-8.62,2.6-2.13,1.73-3.19,4.04-3.19,6.91,0,4.53,2.81,7.47,8.44,8.81l11.44,2.86c5.91,1.53,10.33,3.96,13.27,7.29,2.94,3.33,4.41,7.43,4.41,12.3,0,6.25-2.27,11.3-6.8,15.16-4.53,3.86-10.59,5.79-18.19,5.79-6.84,0-12.63-1.61-17.34-4.83-4.66-3.34-7.41-7.75-8.25-13.22l11.2-2.91c.41,3.09,1.95,5.52,4.62,7.27,2.67,1.75,6.07,2.62,10.2,2.62s7.09-.84,9.35-2.51c2.27-1.67,3.4-3.94,3.4-6.82,0-4.5-2.81-7.47-8.44-8.91l-11.44-2.77c-5.88-1.34-10.29-3.73-13.24-7.15s-4.43-7.6-4.43-12.54c0-6.19,2.2-11.21,6.59-15.07,4.39-3.86,10.16-5.79,17.32-5.79Z"/>
|
||||
<path class="cls-1" d="M332.92,48.7c0,6.88-2.09,12.44-6.26,16.69-4.17,4.25-9.79,6.38-16.85,6.38h-15.75v24.19h-11.91V25.87h27.75c7.12,0,12.74,2.06,16.85,6.16,4.11,4.11,6.16,9.66,6.16,16.66ZM320.45,48.42c0-3.53-1.1-6.4-3.3-8.6s-5.32-3.3-9.35-3.3h-13.73v24.8h13.55c4.12,0,7.3-1.17,9.52-3.52,2.22-2.34,3.33-5.47,3.33-9.38Z"/>
|
||||
<path class="cls-1" d="M343.56,25.87h11.91v29.3l30.89.09v-29.39h12v70.08h-12v-30.14l-30.89-.09v30.23h-11.91V25.87Z"/>
|
||||
<path class="cls-1" d="M434.17,47.29c7.25,0,13.16,2.33,17.72,6.98,4.56,4.66,6.84,10.64,6.84,17.95s-2.28,13.25-6.84,17.91c-4.56,4.66-10.47,6.98-17.72,6.98s-13.25-2.33-17.81-6.98c-4.56-4.66-6.84-10.62-6.84-17.91s2.28-13.34,6.84-17.98c4.56-4.64,10.5-6.96,17.81-6.96ZM434.17,86.9c3.87,0,7.02-1.37,9.45-4.1,2.42-2.73,3.63-6.29,3.63-10.66s-1.21-7.91-3.63-10.62c-2.42-2.7-5.57-4.05-9.45-4.05s-7.17,1.35-9.61,4.05c-2.44,2.7-3.66,6.24-3.66,10.62s1.22,7.93,3.66,10.66c2.44,2.73,5.64,4.1,9.61,4.1Z"/>
|
||||
<path class="cls-1" d="M540.67,65.81v30.14h-11.02v-28.41c0-3.28-.84-5.84-2.53-7.69-1.69-1.84-3.98-2.77-6.89-2.77-3.09,0-5.56,1.01-7.41,3.02-1.84,2.02-2.77,4.84-2.77,8.46v27.38h-11.16v-28.41c0-3.28-.82-5.84-2.46-7.69-1.64-1.84-3.91-2.77-6.82-2.77-3.09,0-5.58,1.01-7.45,3.02s-2.81,4.84-2.81,8.46v27.38h-11.34v-47.34h10.55l.38,4.55c2.75-4.03,7.23-6.05,13.45-6.05,3.62,0,6.77.75,9.42,2.25,2.66,1.5,4.67,3.69,6.05,6.56,1.16-2.75,3.07-4.91,5.74-6.47,2.67-1.56,5.85-2.34,9.54-2.34,5.37,0,9.64,1.66,12.8,4.97,3.16,3.31,4.73,7.89,4.73,13.73Z"/>
|
||||
<path class="cls-1" d="M596.64,76.45h-36.28c.38,3.56,1.72,6.28,4.03,8.16,2.31,1.88,5.25,2.81,8.81,2.81,5.78,0,9.83-2.41,12.14-7.22l9.47,3.75c-1.78,4.16-4.59,7.41-8.41,9.75-3.83,2.34-8.23,3.52-13.2,3.52-7,0-12.68-2.29-17.04-6.87-4.36-4.58-6.54-10.59-6.54-18.02s2.2-13.48,6.59-18.14c4.39-4.66,10.13-6.98,17.23-6.98s12.58,2.3,16.83,6.89c4.25,4.59,6.38,10.64,6.38,18.14v4.22ZM560.55,68.48h24.56c-.22-3.84-1.38-6.77-3.49-8.79s-4.95-3.02-8.51-3.02-6.41,1.02-8.62,3.07c-2.22,2.05-3.53,4.96-3.94,8.74Z"/>
|
||||
</g>
|
||||
<path class="cls-1" d="M114.7,51.58L65.3,2.19c-2.92-2.92-7.69-2.92-10.61,0L5.3,51.58c-2.92,2.92-5.3,8.68-5.3,12.8v45c0,4.12,3.38,7.5,7.5,7.5h29.5V42.21c0-1.66,1.34-3,3-3h40c1.66,0,3,1.34,3,3v12c0,1.66-1.34,3-3,3h-25v6h25c1.66,0,3,1.34,3,3v12c0,1.66-1.34,3-3,3h-25v6h25c1.66,0,3,1.34,3,3v12c0,1.66-1.34,3-3,3h-28c-1.66,0-3-1.34-3-3s1.34-3,3-3h25v-6h-25c-1.66,0-3-1.34-3-3v-12c0-1.66,1.34-3,3-3h25v-6h-25c-1.66,0-3-1.34-3-3v-12c0-1.66,1.34-3,3-3h25v-6h-34v71.67h69.5c4.12,0,7.5-3.38,7.5-7.5v-45c0-4.12-2.39-9.89-5.3-12.8Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -1,24 +1,509 @@
|
||||
color:
|
||||
- id: light_blue
|
||||
hex: "3340FF"
|
||||
|
||||
lvgl:
|
||||
log_level: TRACE
|
||||
bg_color: light_blue
|
||||
widgets:
|
||||
- label:
|
||||
text: Hello world
|
||||
text_color: 0xFF8000
|
||||
align: center
|
||||
text_font: montserrat_40
|
||||
border_post: true
|
||||
theme:
|
||||
obj:
|
||||
border_width: 1
|
||||
|
||||
- label:
|
||||
text: "Hello shiny day"
|
||||
text_color: 0xFFFFFF
|
||||
align: bottom_mid
|
||||
text_font: space16
|
||||
style_definitions:
|
||||
- id: style_test
|
||||
bg_color: 0x2F8CD8
|
||||
- id: header_footer
|
||||
bg_color: 0x20214F
|
||||
bg_grad_color: 0x005782
|
||||
bg_grad_dir: VER
|
||||
bg_opa: cover
|
||||
border_width: 0
|
||||
radius: 0
|
||||
pad_all: 0
|
||||
border_color: 0x0077b3
|
||||
text_color: 0xFFFFFF
|
||||
width: 100%
|
||||
height: 30
|
||||
border_side: [left, top]
|
||||
text_decor: [underline, strikethrough]
|
||||
- id: style_line
|
||||
line_color: light_blue
|
||||
line_width: 8
|
||||
line_rounded: true
|
||||
- id: date_style
|
||||
text_font: roboto10
|
||||
align: center
|
||||
text_color: 0x000000
|
||||
bg_opa: cover
|
||||
radius: 4
|
||||
pad_all: 2
|
||||
- id: spin_button
|
||||
height: 40
|
||||
width: 40
|
||||
- id: spin_label
|
||||
align: center
|
||||
text_align: center
|
||||
text_font: space16
|
||||
- id: bdr_style
|
||||
border_color: 0x808080
|
||||
border_width: 2
|
||||
pad_all: 4
|
||||
align: center
|
||||
|
||||
touchscreens:
|
||||
- touchscreen_id: tft_touch
|
||||
long_press_repeat_time: 200ms
|
||||
long_press_time: 500ms
|
||||
pages:
|
||||
- id: page1
|
||||
skip: true
|
||||
layout:
|
||||
type: flex
|
||||
pad_row: 4
|
||||
pad_column: 4px
|
||||
flex_align_main: center
|
||||
flex_align_cross: start
|
||||
flex_align_track: end
|
||||
widgets:
|
||||
- animimg:
|
||||
height: 60
|
||||
id: anim_img
|
||||
src: [cat_image, dog_image]
|
||||
repeat_count: 10
|
||||
duration: 1s
|
||||
auto_start: true
|
||||
- label:
|
||||
id: hello_label
|
||||
text: Hello world
|
||||
text_color: 0xFF8000
|
||||
align: center
|
||||
text_font: montserrat_40
|
||||
border_post: true
|
||||
on_click:
|
||||
then:
|
||||
- lvgl.animimg.stop: anim_img
|
||||
- label:
|
||||
text: "Hello shiny day"
|
||||
text_color: 0xFFFFFF
|
||||
align: bottom_mid
|
||||
text_font: space16
|
||||
- obj:
|
||||
align: center
|
||||
arc_opa: COVER
|
||||
arc_color: 0xFF0000
|
||||
arc_rounded: false
|
||||
arc_width: 3
|
||||
anim_time: 1s
|
||||
bg_color: light_blue
|
||||
bg_grad_color: light_blue
|
||||
bg_dither_mode: ordered
|
||||
bg_grad_dir: hor
|
||||
bg_grad_stop: 128
|
||||
bg_image_opa: transp
|
||||
bg_image_recolor: light_blue
|
||||
bg_image_recolor_opa: 50%
|
||||
bg_main_stop: 0
|
||||
bg_opa: 20%
|
||||
border_color: 0x00FF00
|
||||
border_opa: cover
|
||||
border_post: true
|
||||
border_side: [bottom, left]
|
||||
border_width: 4
|
||||
clip_corner: false
|
||||
color_filter_opa: transp
|
||||
height: 50%
|
||||
image_recolor: light_blue
|
||||
image_recolor_opa: cover
|
||||
line_width: 10
|
||||
line_dash_width: 10
|
||||
line_dash_gap: 10
|
||||
line_rounded: false
|
||||
line_color: light_blue
|
||||
opa: cover
|
||||
opa_layered: cover
|
||||
outline_color: light_blue
|
||||
outline_opa: cover
|
||||
outline_pad: 10px
|
||||
outline_width: 10px
|
||||
pad_all: 10px
|
||||
pad_bottom: 10px
|
||||
pad_left: 10px
|
||||
pad_right: 10px
|
||||
pad_top: 10px
|
||||
shadow_color: light_blue
|
||||
shadow_ofs_x: 5
|
||||
shadow_ofs_y: 5
|
||||
shadow_opa: cover
|
||||
shadow_spread: 5
|
||||
shadow_width: 10
|
||||
text_align: auto
|
||||
text_color: light_blue
|
||||
text_decor: [underline, strikethrough]
|
||||
text_font: montserrat_18
|
||||
text_letter_space: 4
|
||||
text_line_space: 4
|
||||
text_opa: cover
|
||||
transform_angle: 180
|
||||
transform_height: 100
|
||||
transform_pivot_x: 50%
|
||||
transform_pivot_y: 50%
|
||||
transform_zoom: 0.5
|
||||
translate_x: 10
|
||||
translate_y: 10
|
||||
max_height: 100
|
||||
max_width: 200
|
||||
min_height: 20%
|
||||
min_width: 20%
|
||||
radius: circle
|
||||
width: 10px
|
||||
x: 100
|
||||
y: 120
|
||||
- buttonmatrix:
|
||||
on_press:
|
||||
logger.log:
|
||||
format: "matrix button pressed: %d"
|
||||
args: ["x"]
|
||||
on_long_press:
|
||||
lvgl.matrix.button.update:
|
||||
id: [button_a, button_e, button_c]
|
||||
control:
|
||||
disabled: true
|
||||
on_click:
|
||||
logger.log:
|
||||
format: "matrix button clicked: %d, is button_a = %u"
|
||||
args: ["x", "id(button_a) == x"]
|
||||
items:
|
||||
checked:
|
||||
bg_color: 0xFFFF00
|
||||
id: b_matrix
|
||||
|
||||
rows:
|
||||
- buttons:
|
||||
- id: button_a
|
||||
text: home icon
|
||||
width: 2
|
||||
control:
|
||||
checkable: true
|
||||
on_value:
|
||||
logger.log:
|
||||
format: "button_a value %d"
|
||||
args: [x]
|
||||
- id: button_b
|
||||
text: B
|
||||
width: 1
|
||||
on_value:
|
||||
logger.log:
|
||||
format: "button_b value %d"
|
||||
args: [x]
|
||||
on_click:
|
||||
then:
|
||||
- lvgl.page.previous:
|
||||
control:
|
||||
hidden: false
|
||||
- buttons:
|
||||
- id: button_c
|
||||
text: C
|
||||
control:
|
||||
checkable: false
|
||||
- id: button_d
|
||||
text: menu left
|
||||
on_long_press:
|
||||
then:
|
||||
logger.log: Long pressed
|
||||
on_long_press_repeat:
|
||||
then:
|
||||
logger.log: Long pressed repeated
|
||||
- buttons:
|
||||
- id: button_e
|
||||
- button:
|
||||
id: button_button
|
||||
width: 20%
|
||||
height: 10%
|
||||
pressed:
|
||||
bg_color: light_blue
|
||||
checkable: true
|
||||
checked:
|
||||
bg_color: 0x000000
|
||||
widgets:
|
||||
- label:
|
||||
text: Button
|
||||
on_click:
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
bg_color: 0x123456
|
||||
text: clicked
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text: !lambda return "hello world";
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text: !lambda |-
|
||||
ESP_LOGD("label", "multi-line lambda");
|
||||
return "hello world";
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text: !lambda 'return str_sprintf("Hello space");'
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text:
|
||||
format: "sprintf format %s"
|
||||
args: ['x ? "checked" : "unchecked"']
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text:
|
||||
time_format: "%c"
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text:
|
||||
time_format: "%c"
|
||||
time: time_id
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text:
|
||||
time_format: "%c"
|
||||
time: !lambda return id(time_id).now();
|
||||
- lvgl.label.update:
|
||||
id: hello_label
|
||||
text:
|
||||
time_format: "%c"
|
||||
time: !lambda |-
|
||||
ESP_LOGD("label", "multi-line lambda");
|
||||
return id(time_id).now();
|
||||
on_value:
|
||||
logger.log:
|
||||
format: "state now %d"
|
||||
args: [x]
|
||||
on_short_click:
|
||||
lvgl.widget.hide: hello_label
|
||||
on_long_press:
|
||||
lvgl.widget.show: hello_label
|
||||
on_cancel:
|
||||
lvgl.widget.enable: hello_label
|
||||
on_ready:
|
||||
lvgl.widget.disable: hello_label
|
||||
on_defocus:
|
||||
lvgl.widget.hide: hello_label
|
||||
on_focus:
|
||||
logger.log: Button clicked
|
||||
on_scroll:
|
||||
logger.log: Button clicked
|
||||
on_scroll_end:
|
||||
logger.log: Button clicked
|
||||
on_scroll_begin:
|
||||
logger.log: Button clicked
|
||||
on_release:
|
||||
logger.log: Button clicked
|
||||
on_long_press_repeat:
|
||||
logger.log: Button clicked
|
||||
- led:
|
||||
id: lv_led
|
||||
color: 0x00FF00
|
||||
brightness: 50%
|
||||
align: right_mid
|
||||
- spinner:
|
||||
arc_length: 120
|
||||
spin_time: 2s
|
||||
align: left_mid
|
||||
- image:
|
||||
src: cat_image
|
||||
align: top_left
|
||||
y: 50
|
||||
|
||||
- id: page2
|
||||
widgets:
|
||||
- button:
|
||||
styles: spin_button
|
||||
id: spin_up
|
||||
on_click:
|
||||
- lvgl.spinbox.increment: spinbox_id
|
||||
widgets:
|
||||
- label:
|
||||
styles: spin_label
|
||||
text: "+"
|
||||
- spinbox:
|
||||
text_font: space16
|
||||
id: spinbox_id
|
||||
align: center
|
||||
width: 120
|
||||
range_from: -10
|
||||
range_to: 1000
|
||||
step: 5.0
|
||||
rollover: false
|
||||
digits: 6
|
||||
decimal_places: 2
|
||||
value: 15
|
||||
on_value:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Spinbox value is %f"
|
||||
args: [x]
|
||||
- button:
|
||||
styles: spin_button
|
||||
id: spin_down
|
||||
on_click:
|
||||
- lvgl.spinbox.decrement: spinbox_id
|
||||
widgets:
|
||||
- label:
|
||||
styles: spin_label
|
||||
text: "-"
|
||||
- arc:
|
||||
align: left_mid
|
||||
id: lv_arc
|
||||
adjustable: true
|
||||
on_value:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Arc value is %f"
|
||||
args: [x]
|
||||
scroll_on_focus: true
|
||||
value: 75
|
||||
min_value: 1
|
||||
max_value: 100
|
||||
arc_color: 0xFF0000
|
||||
indicator:
|
||||
arc_color: 0xF000FF
|
||||
pressed:
|
||||
arc_color: 0xFFFF00
|
||||
focused:
|
||||
arc_color: 0x808080
|
||||
- bar:
|
||||
id: bar_id
|
||||
align: top_mid
|
||||
y: 20
|
||||
value: 30
|
||||
max_value: 100
|
||||
min_value: 10
|
||||
mode: range
|
||||
on_click:
|
||||
then:
|
||||
- lvgl.bar.update:
|
||||
id: bar_id
|
||||
value: !lambda return (int)((float)rand() / RAND_MAX * 100);
|
||||
- logger.log:
|
||||
format: "bar value %f"
|
||||
args: [x]
|
||||
- line:
|
||||
id: lv_line_id
|
||||
align: center
|
||||
points:
|
||||
- 5, 5
|
||||
- 70, 70
|
||||
- 120, 10
|
||||
- 180, 60
|
||||
- 240, 10
|
||||
on_click:
|
||||
- lvgl.widget.update:
|
||||
id: lv_line_id
|
||||
line_color: 0xFFFF
|
||||
- lvgl.page.next:
|
||||
- switch:
|
||||
align: right_mid
|
||||
- checkbox:
|
||||
id: checkbox_id
|
||||
text: Checkbox
|
||||
align: bottom_right
|
||||
- slider:
|
||||
id: slider_id
|
||||
align: top_mid
|
||||
y: 40
|
||||
value: 30
|
||||
max_value: 100
|
||||
min_value: 10
|
||||
mode: normal
|
||||
on_value:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "slider value %f"
|
||||
args: [x]
|
||||
on_click:
|
||||
then:
|
||||
- lvgl.slider.update:
|
||||
id: slider_id
|
||||
value: !lambda return (int)((float)rand() / RAND_MAX * 100);
|
||||
- tabview:
|
||||
id: tabview_id
|
||||
width: 100%
|
||||
height: 80%
|
||||
position: top
|
||||
on_value:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: return tab == id(tabview_tab_1);
|
||||
then:
|
||||
- logger.log: "Dog tab is now showing"
|
||||
tabs:
|
||||
- name: Dog
|
||||
id: tabview_tab_1
|
||||
border_width: 2
|
||||
border_color: 0xff0000
|
||||
width: 100%
|
||||
pad_all: 8
|
||||
layout:
|
||||
type: grid
|
||||
grid_row_align: end
|
||||
grid_rows: [25px, fr(1), content]
|
||||
grid_columns: [40, fr(1), fr(1)]
|
||||
pad_row: 6px
|
||||
pad_column: 0
|
||||
widgets:
|
||||
- image:
|
||||
grid_cell_row_pos: 0
|
||||
grid_cell_column_pos: 0
|
||||
src: dog_image
|
||||
on_click:
|
||||
then:
|
||||
- lvgl.tabview.select:
|
||||
id: tabview_id
|
||||
index: 1
|
||||
animated: true
|
||||
- label:
|
||||
styles: bdr_style
|
||||
grid_cell_x_align: center
|
||||
grid_cell_y_align: stretch
|
||||
grid_cell_row_pos: 0
|
||||
grid_cell_column_pos: 1
|
||||
grid_cell_column_span: 1
|
||||
text: "Grid cell 0/1"
|
||||
- label:
|
||||
grid_cell_x_align: end
|
||||
styles: bdr_style
|
||||
grid_cell_row_pos: 1
|
||||
grid_cell_column_pos: 0
|
||||
text: "Grid cell 1/0"
|
||||
- label:
|
||||
styles: bdr_style
|
||||
grid_cell_row_pos: 1
|
||||
grid_cell_column_pos: 1
|
||||
text: "Grid cell 1/1"
|
||||
- label:
|
||||
id: cell_1_3
|
||||
styles: bdr_style
|
||||
grid_cell_row_pos: 1
|
||||
grid_cell_column_pos: 2
|
||||
text: "Grid cell 1/2"
|
||||
- name: Cat
|
||||
id: tabview_tab_2
|
||||
widgets:
|
||||
- image:
|
||||
src: cat_image
|
||||
on_click:
|
||||
then:
|
||||
- logger.log: Cat image clicked
|
||||
- lvgl.tabview.select:
|
||||
id: tabview_id
|
||||
index: 0
|
||||
animated: true
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: space16
|
||||
bpp: 4
|
||||
|
||||
image:
|
||||
- id: cat_image
|
||||
resize: 256x48
|
||||
file: $component_dir/logo-text.svg
|
||||
- id: dog_image
|
||||
file: $component_dir/logo-text.svg
|
||||
resize: 256x48
|
||||
type: TRANSPARENT_BINARY
|
||||
|
||||
color:
|
||||
- id: light_blue
|
||||
hex: "3340FF"
|
||||
|
||||
BIN
tests/components/lvgl/materialdesignicons-webfont.ttf
Normal file
BIN
tests/components/lvgl/materialdesignicons-webfont.ttf
Normal file
Binary file not shown.
BIN
tests/components/lvgl/roboto.ttf
Normal file
BIN
tests/components/lvgl/roboto.ttf
Normal file
Binary file not shown.
@@ -24,6 +24,34 @@ display:
|
||||
invert_colors: false
|
||||
update_interval: never
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
internal: true
|
||||
id: up_button
|
||||
pin:
|
||||
number: GPIO38
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
internal: true
|
||||
id: down_button
|
||||
pin:
|
||||
number: GPIO37
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
internal: true
|
||||
id: select_button
|
||||
pin:
|
||||
number: GPIO39
|
||||
inverted: true
|
||||
lvgl:
|
||||
encoders:
|
||||
group: switches
|
||||
initial_focus: button_button
|
||||
enter_button: select_button
|
||||
sensor:
|
||||
left_button: up_button
|
||||
right_button: down_button
|
||||
|
||||
packages:
|
||||
lvgl: !include lvgl-package.yaml
|
||||
|
||||
|
||||
@@ -6,6 +6,23 @@ i2c:
|
||||
sda: GPIO18
|
||||
scl: GPIO19
|
||||
|
||||
sensor:
|
||||
- platform: rotary_encoder
|
||||
name: "Rotary Encoder"
|
||||
id: encoder
|
||||
pin_a: 2
|
||||
pin_b: 1
|
||||
internal: true
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: pushbutton
|
||||
name: Pushbutton
|
||||
pin:
|
||||
number: 0
|
||||
inverted: true
|
||||
ignore_strapping_warning: true
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
model: st7789v
|
||||
@@ -19,7 +36,9 @@ display:
|
||||
mirror_y: true
|
||||
data_rate: 80MHz
|
||||
cs_pin: GPIO20
|
||||
dc_pin: GPIO15
|
||||
dc_pin:
|
||||
number: GPIO15
|
||||
ignore_strapping_warning: true
|
||||
auto_clear_enabled: false
|
||||
invert_colors: false
|
||||
update_interval: never
|
||||
@@ -48,5 +67,9 @@ lvgl:
|
||||
displays:
|
||||
- tft_display
|
||||
- second_display
|
||||
encoders:
|
||||
sensor: encoder
|
||||
enter_button: pushbutton
|
||||
group: general
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -426,3 +426,9 @@ valve:
|
||||
} else {
|
||||
return VALVE_CLOSED;
|
||||
}
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
name: Alarm Control Panel
|
||||
binary_sensors:
|
||||
- input: some_binary_sensor
|
||||
|
||||
4
tests/components/network/test-ipv6.bk72xx-ard.yaml
Normal file
4
tests/components/network/test-ipv6.bk72xx-ard.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
substitutions:
|
||||
network_enable_ipv6: "false"
|
||||
|
||||
<<: !include common.yaml
|
||||
18
tests/components/online_image/common-esp32.yaml
Normal file
18
tests/components/online_image/common-esp32.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
spi:
|
||||
- id: spi_main_lcd
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 12
|
||||
dc_pin: 13
|
||||
reset_pin: 21
|
||||
lambda: |-
|
||||
it.fill(Color(0, 0, 0));
|
||||
it.image(0, 0, id(online_rgba_image));
|
||||
18
tests/components/online_image/common-esp8266.yaml
Normal file
18
tests/components/online_image/common-esp8266.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
spi:
|
||||
- id: spi_main_lcd
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 15
|
||||
dc_pin: 3
|
||||
reset_pin: 1
|
||||
lambda: |-
|
||||
it.fill(Color(0, 0, 0));
|
||||
it.image(0, 0, id(online_rgba_image));
|
||||
37
tests/components/online_image/common.yaml
Normal file
37
tests/components/online_image/common.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
# Purposely test that `online_image:` does auto-load `image:`
|
||||
# Keep the `image:` undefined.
|
||||
# image:
|
||||
online_image:
|
||||
- id: online_binary_image
|
||||
url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
|
||||
format: PNG
|
||||
type: BINARY
|
||||
resize: 50x50
|
||||
- id: online_binary_transparent_image
|
||||
url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
|
||||
type: TRANSPARENT_BINARY
|
||||
format: png
|
||||
- id: online_rgba_image
|
||||
url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
|
||||
format: PNG
|
||||
type: RGBA
|
||||
- id: online_rgb24_image
|
||||
url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
|
||||
format: PNG
|
||||
type: RGB24
|
||||
use_transparency: true
|
||||
|
||||
# Check the set_url action
|
||||
time:
|
||||
- platform: sntp
|
||||
on_time:
|
||||
- at: "13:37:42"
|
||||
then:
|
||||
- online_image.set_url:
|
||||
id: online_rgba_image
|
||||
url: http://www.example.org/example.png
|
||||
|
||||
4
tests/components/online_image/test.esp32-ard.yaml
Normal file
4
tests/components/online_image/test.esp32-ard.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<<: !include common-esp32.yaml
|
||||
|
||||
http_request:
|
||||
verify_ssl: false
|
||||
4
tests/components/online_image/test.esp32-idf.yaml
Normal file
4
tests/components/online_image/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<<: !include common-esp32.yaml
|
||||
|
||||
http_request:
|
||||
|
||||
@@ -220,6 +220,8 @@ switch:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
output_source_priority_hybrid:
|
||||
name: inverter0_output_source_priority_hybrid
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
|
||||
@@ -220,6 +220,8 @@ switch:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
output_source_priority_hybrid:
|
||||
name: inverter0_output_source_priority_hybrid
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
|
||||
@@ -220,6 +220,8 @@ switch:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
output_source_priority_hybrid:
|
||||
name: inverter0_output_source_priority_hybrid
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
|
||||
@@ -220,6 +220,8 @@ switch:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
output_source_priority_hybrid:
|
||||
name: inverter0_output_source_priority_hybrid
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
|
||||
@@ -220,6 +220,8 @@ switch:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
output_source_priority_hybrid:
|
||||
name: inverter0_output_source_priority_hybrid
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
|
||||
@@ -220,6 +220,8 @@ switch:
|
||||
name: inverter0_output_source_priority_solar
|
||||
output_source_priority_battery:
|
||||
name: inverter0_output_source_priority_battery
|
||||
output_source_priority_hybrid:
|
||||
name: inverter0_output_source_priority_hybrid
|
||||
input_voltage_range:
|
||||
name: inverter0_input_voltage_range
|
||||
pv_ok_condition_for_parallel:
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 16
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 6
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 6
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 16
|
||||
|
||||
@@ -1 +1,28 @@
|
||||
substitutions:
|
||||
verify_ssl: "true"
|
||||
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
update.is_available:
|
||||
then:
|
||||
- logger.log: "Update available"
|
||||
- update.perform:
|
||||
force_update: true
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
http_request:
|
||||
verify_ssl: ${verify_ssl}
|
||||
|
||||
ota:
|
||||
- platform: http_request
|
||||
|
||||
update:
|
||||
- platform: http_request
|
||||
name: Firmware Update
|
||||
source: http://example.com/manifest.json
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
substitutions:
|
||||
verify_ssl: "false"
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
substitutions:
|
||||
verify_ssl: "false"
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
substitutions:
|
||||
verify_ssl: "false"
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
device_base: !include common.yaml
|
||||
|
||||
web_server:
|
||||
port: 8080
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
device_base: !include common.yaml
|
||||
|
||||
web_server:
|
||||
port: 8080
|
||||
|
||||
12
tests/components/xiaomi_lywsd02mmc/common.yaml
Normal file
12
tests/components/xiaomi_lywsd02mmc/common.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
esp32_ble_tracker:
|
||||
|
||||
sensor:
|
||||
- platform: xiaomi_lywsd02mmc
|
||||
mac_address: A4:C1:38:54:5E:18
|
||||
bindkey: 2529d8e0d23150a588675cc54ad48400
|
||||
temperature:
|
||||
name: Xiaomi LYWSD02MMC Temperature
|
||||
humidity:
|
||||
name: Xiaomi LYWSD02MMC Humidity
|
||||
battery_level:
|
||||
name: Xiaomi LYWSD02MMC Battery Level
|
||||
1
tests/components/xiaomi_lywsd02mmc/test.esp32-ard.yaml
Normal file
1
tests/components/xiaomi_lywsd02mmc/test.esp32-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
1
tests/components/xiaomi_lywsd02mmc/test.esp32-idf.yaml
Normal file
1
tests/components/xiaomi_lywsd02mmc/test.esp32-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
||||
Reference in New Issue
Block a user