Merge branch 'dev' into bump-1.17.0b1

This commit is contained in:
Jesse Hills
2021-03-22 20:08:57 +13:00
553 changed files with 27573 additions and 13992 deletions

View File

@@ -1,8 +1,12 @@
substitutions:
devicename: test1
sensorname: my
textname: template
roomname: living_room
esphome:
name: test1
name_add_mac_suffix: true
platform: ESP32
board: nodemcu-32s
on_boot:
@@ -26,6 +30,31 @@ esphome:
green: !lambda 'return 255;'
blue: 0%
white: 100%
- http_request.get:
url: https://esphome.io
headers:
Content-Type: application/json
verify_ssl: false
- http_request.post:
url: https://esphome.io
verify_ssl: false
json:
key: !lambda |-
return id(${textname}_text).state;
greeting: 'Hello World'
- http_request.send:
method: PUT
url: https://esphome.io
headers:
Content-Type: application/json
body: 'Some data'
verify_ssl: false
on_response:
then:
- logger.log:
format: 'Response status: %d'
args:
- status_code
build_path: build/test1
packages:
@@ -50,6 +79,10 @@ wifi:
reboot_timeout: 120s
power_save_mode: none
http_request:
useragent: esphome/device
timeout: 10s
mqtt:
broker: '192.168.178.84'
port: 1883
@@ -98,7 +131,7 @@ mqtt:
int data = x["my_data"];
ESP_LOGD("main", "The data is: %d", data);
- light.turn_on:
id: living_room_lights
id: ${roomname}_lights
brightness: !lambda |-
float brightness = 1.0;
if (x.containsKey("brightness"))
@@ -110,17 +143,21 @@ mqtt:
effect = x["effect"];
return effect;
- light.control:
id: living_room_lights
brightness: !lambda 'return id(living_room_lights).current_values.get_brightness() + 0.5;'
id: ${roomname}_lights
brightness: !lambda 'return id(${roomname}_lights).current_values.get_brightness() + 0.5;'
- light.dim_relative:
id: living_room_lights
id: ${roomname}_lights
relative_brightness: 5%
- uart.write:
id: uart0
data: Hello World
- uart.write: [0x00, 0x20, 0x30]
- uart.write: !lambda |-
return {};
- uart.write:
id: uart0
data: [0x00, 0x20, 0x30]
- uart.write:
id: uart0
data: !lambda |-
return {};
i2c:
sda: 21
@@ -143,6 +180,7 @@ uart:
data_bits: 8
stop_bits: 1
rx_buffer_size: 512
invert: false
- id: adalight_uart
tx_pin: GPIO25
@@ -237,6 +275,14 @@ sensor:
window_size: 5
send_every: 5
send_first_at: 3
- min:
window_size: 5
send_every: 5
send_first_at: 3
- max:
window_size: 5
send_every: 5
send_first_at: 3
- sliding_window_moving_average:
window_size: 15
send_every: 15
@@ -256,9 +302,9 @@ sensor:
then:
- lambda: |-
ESP_LOGD("main", "Got value %f", x);
id(my_sensor).publish_state(42.0);
ESP_LOGI("main", "Value of my sensor: %f", id(my_sensor).state);
ESP_LOGI("main", "Raw Value of my sensor: %f", id(my_sensor).state);
id(${sensorname}_sensor).publish_state(42.0);
ESP_LOGI("main", "Value of my sensor: %f", id(${sensorname}_sensor).state);
ESP_LOGI("main", "Raw Value of my sensor: %f", id(${sensorname}_sensor).state);
on_value_range:
above: 5
below: 10
@@ -285,7 +331,7 @@ sensor:
- platform: ads1115
multiplexer: 'A0_A1'
gain: 1.024
id: my_sensor
id: ${sensorname}_sensor
filters:
state_topic: hi/me
retain: false
@@ -435,7 +481,7 @@ sensor:
name: 'HLW8012 Power'
id: hlw8012_power
energy:
name: "HLW8012 Energy"
name: 'HLW8012 Energy'
id: hlw8012_energy
update_interval: 15s
current_resistor: 0.001 ohm
@@ -549,6 +595,7 @@ sensor:
reference_resistance: '430 Ω'
rtd_nominal_resistance: '100 Ω'
- platform: mhz19
uart_id: uart0
co2:
name: 'MH-Z19 CO2 Value'
temperature:
@@ -586,6 +633,13 @@ sensor:
falling_edge: DECREMENT
internal_filter: 13us
update_interval: 15s
- platform: pulse_meter
name: 'Pulse Meter'
pin: GPIO12
internal_filter: 100ms
timeout: 2 min
total:
name: 'Pulse Meter Total'
- platform: rotary_encoder
name: 'Rotary Encoder'
id: rotary_encoder1
@@ -613,10 +667,23 @@ sensor:
- platform: pulse_width
name: Pulse Width
pin: GPIO12
- platform: senseair
- platform: sm300d2
uart_id: uart0
co2:
name: 'SenseAir CO2 Value'
update_interval: 15s
name: 'SM300D2 CO2 Value'
formaldehyde:
name: 'SM300D2 Formaldehyde Value'
tvoc:
name: 'SM300D2 TVOC Value'
pm_2_5:
name: 'SM300D2 PM2.5 Value'
pm_10_0:
name: 'SM300D2 PM10 Value'
temperature:
name: 'SM300D2 Temperature Value'
humidity:
name: 'SM300D2 Humidity Value'
update_interval: 60s
- platform: sht3xd
temperature:
name: 'Living Room Temperature 8'
@@ -735,6 +802,7 @@ sensor:
root["key"] = id(the_sensor).state;
root["greeting"] = "Hello World";
- platform: sds011
uart_id: uart0
pm_2_5:
name: 'SDS011 PM2.5'
pm_10_0:
@@ -784,6 +852,7 @@ sensor:
name: 'AQI'
calculation_type: 'CAQI'
- platform: teleinfo
uart_id: uart0
tags:
- tag_name: 'HCHC'
sensor:
@@ -829,7 +898,7 @@ binary_sensor:
- platform: gpio
name: 'MCP23S08 Pin #1'
pin:
mcp23s08: mcp23s08_hub
mcp23xxx: mcp23s08_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
@@ -838,12 +907,22 @@ binary_sensor:
- platform: gpio
name: 'MCP23S17 Pin #1'
pin:
mcp23s17: mcp23s17_hub
mcp23xxx: mcp23s17_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
mode: INPUT_PULLUP
inverted: False
- platform: gpio
name: 'MCP23S17 Pin #1 with interrupt'
pin:
mcp23xxx: mcp23s17_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
mode: INPUT_PULLUP
inverted: False
interrupt: FALLING
- platform: gpio
pin: GPIO9
name: 'Living Room Window'
@@ -924,12 +1003,12 @@ binary_sensor:
name: 'Garage Door Open'
id: garage_door
lambda: |-
if (isnan(id(my_sensor).state)) {
if (isnan(id(${sensorname}_sensor).state)) {
// isnan checks if the ultrasonic sensor echo
// has timed out, resulting in a NaN (not a number) state
// in that case, return {} to indicate that we don't know.
return {};
} else if (id(my_sensor).state > 30) {
} else if (id(${sensorname}_sensor).state > 30) {
// Garage Door is open.
return true;
} else {
@@ -947,6 +1026,7 @@ binary_sensor:
id: gpio_19
frequency: !lambda 'return 500.0;'
- platform: pn532
pn532_id: pn532_bs
uid: 74-10-37-94
name: 'PN532 NFC Tag'
- platform: rdm6300
@@ -962,14 +1042,14 @@ binary_sensor:
- platform: gpio
name: 'MCP21 binary sensor'
pin:
mcp23017: mcp23017_hub
mcp23xxx: mcp23017_hub
number: 1
mode: INPUT
inverted: True
- platform: gpio
name: 'MCP22 binary sensor'
pin:
mcp23008: mcp23008_hub
mcp23xxx: mcp23008_hub
number: 7
mode: INPUT_PULLUP
inverted: False
@@ -1126,14 +1206,14 @@ output:
- platform: gpio
id: id22
pin:
mcp23017: mcp23017_hub
mcp23xxx: mcp23017_hub
number: 0
mode: OUTPUT
inverted: False
- platform: gpio
id: id23
pin:
mcp23008: mcp23008_hub
mcp23xxx: mcp23008_hub
number: 0
mode: OUTPUT
inverted: False
@@ -1173,6 +1253,8 @@ output:
- platform: esp32_dac
pin: GPIO25
id: dac_output
- platform: mcp4725
id: mcp4725_dac_output
e131:
@@ -1220,7 +1302,7 @@ light:
state = 0;
- platform: rgb
name: 'Living Room Lights'
id: living_room_lights
id: ${roomname}_lights
red: pca_0
green: pca_1
blue: pca_2
@@ -1376,14 +1458,14 @@ climate:
name: TCL112 Climate With Sensor
supports_heat: True
supports_cool: True
sensor: my_sensor
sensor: ${sensorname}_sensor
- platform: tcl112
name: TCL112 Climate
- platform: coolix
name: Coolix Climate With Sensor
supports_heat: True
supports_cool: True
sensor: my_sensor
sensor: ${sensorname}_sensor
- platform: coolix
name: Coolix Climate
- platform: fujitsu_general
@@ -1402,12 +1484,29 @@ climate:
name: Toshiba Climate
- platform: hitachi_ac344
name: Hitachi Climate
- platform: midea_ac
visual:
min_temperature: 18 °C
max_temperature: 25 °C
temperature_step: 0.1 °C
name: "Electrolux EACS"
beeper: true
outdoor_temperature:
name: "Temp"
power_usage:
name: "Power"
humidity_setpoint:
name: "Hum"
midea_dongle:
uart_id: uart0
strength_icon: true
switch:
- platform: gpio
name: 'MCP23S08 Pin #0'
pin:
mcp23s08: mcp23s08_hub
mcp23xxx: mcp23s08_hub
# Use pin number 0
number: 0
mode: OUTPUT
@@ -1415,7 +1514,7 @@ switch:
- platform: gpio
name: 'MCP23S17 Pin #0'
pin:
mcp23s17: mcp23s17_hub
mcp23xxx: mcp23s17_hub
# Use pin number 0
number: 1
mode: OUTPUT
@@ -1451,6 +1550,12 @@ switch:
turn_on_action:
remote_transmitter.transmit_samsung:
data: 0xABCDEF
- platform: template
name: Samsung36
turn_on_action:
remote_transmitter.transmit_samsung36:
address: 0x0400
command: 0x000E00FF
- platform: template
name: Sony
turn_on_action:
@@ -1542,6 +1647,9 @@ switch:
- output.set_level:
id: dac_output
level: !lambda 'return 0.5;'
- output.set_level:
id: mcp4725_dac_output
level: !lambda 'return 0.5;'
turn_off_action:
- switch.turn_on: living_room_lights_off
restore_state: False
@@ -1582,11 +1690,18 @@ switch:
id: my_switch
state: !lambda 'return false;'
- platform: uart
uart_id: uart0
name: 'UART String Output'
data: 'DataToSend'
- platform: uart
uart_id: uart0
name: 'UART Bytes Output'
data: [0xDE, 0xAD, 0xBE, 0xEF]
- platform: uart
uart_id: uart0
name: 'UART Recurring Output'
data: [0xDE, 0xAD, 0xBE, 0xEF]
send_every: 1s
- platform: template
assumed_state: yes
name: Stepper Switch
@@ -1620,13 +1735,10 @@ fan:
direction_output: gpio_26
- platform: speed
output: pca_6
speed_count: 10
name: 'Living Room Fan 2'
oscillation_output: gpio_19
direction_output: gpio_26
speed:
low: 0.45
medium: 0.75
high: 1.0
oscillation_state_topic: oscillation/state/topic
oscillation_command_topic: oscillation/command/topic
speed_state_topic: speed/state/topic
@@ -1653,7 +1765,7 @@ interval:
color:
- id: kbx_red
red: 100%
green: 1%
green_int: 123
blue: 2%
- id: kbx_blue
red: 0%
@@ -1690,15 +1802,16 @@ display:
it.print("1234");
- platform: tm1637
clk_pin:
mcp23017: mcp23017_hub
mcp23xxx: mcp23017_hub
number: 1
dio_pin:
mcp23017: mcp23017_hub
mcp23xxx: mcp23017_hub
number: 2
intensity: 3
lambda: |-
it.print("1234");
- platform: nextion
uart_id: uart0
lambda: |-
it.set_component_value("gauge", 50);
it.set_component_text("textview", "Hello World!");
@@ -1730,7 +1843,7 @@ display:
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
- platform: ssd1322_spi
model: "SSD1322 256x64"
model: 'SSD1322 256x64'
cs_pin: GPIO23
dc_pin: GPIO23
reset_pin: GPIO23
@@ -1776,24 +1889,6 @@ display:
reset_pin: GPIO23
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
- platform: waveshare_epaper
cs_pin: GPIO23
dc_pin: GPIO23
busy_pin: GPIO23
reset_pin: GPIO23
model: 2.90in
full_update_every: 30
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
- platform: waveshare_epaper
cs_pin: GPIO23
dc_pin: GPIO23
busy_pin: GPIO23
reset_pin: GPIO23
model: 2.90inv2
full_update_every: 30
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
- platform: st7789v
cs_pin: GPIO5
dc_pin: GPIO16
@@ -1807,10 +1902,10 @@ display:
dc_pin: GPIO16
reset_pin: GPIO23
rotation: 0
devicewidth: 128
deviceheight: 160
colstart: 0
rowstart: 0
device_width: 128
device_height: 160
col_start: 0
row_start: 0
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
tm1651:
@@ -1826,6 +1921,7 @@ status_led:
pin: GPIO2
pn532_spi:
id: pn532_bs
cs_pin: GPIO23
update_interval: 1s
on_tag:
@@ -1838,6 +1934,7 @@ pn532_spi:
pn532_i2c:
rdm6300:
uart_id: uart0
rc522_spi:
cs_pin: GPIO23
@@ -1853,6 +1950,7 @@ rc522_i2c:
ESP_LOGD("main", "Found tag %s", x.c_str());
gps:
uart_id: uart0
time:
- platform: sntp
@@ -1875,8 +1973,7 @@ time:
update_interval: never
on_time:
seconds: 0
then:
ds1307.read_time
then: ds1307.read_time
cover:
- platform: template
@@ -1950,10 +2047,10 @@ text_sensor:
qos: 2
on_value:
- text_sensor.template.publish:
id: template_text
id: ${textname}_text
state: Hello World
- text_sensor.template.publish:
id: template_text
id: ${textname}_text
state: |-
return "Hello World2";
- globals.set:
@@ -1964,7 +2061,7 @@ text_sensor:
data: [0x10, 0x20, 0x30]
- platform: template
name: Template Text Sensor
id: template_text
id: ${textname}_text
- platform: wifi_info
ip_address:
name: 'IP Address'
@@ -2006,4 +2103,4 @@ canbus:
condition:
lambda: 'return x[0] == 0x11;'
then:
light.toggle: living_room_lights
light.toggle: ${roomname}_lights