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

Formatted test yaml files (#1382)

This commit is contained in:
SenexCrenshaw 2020-11-19 21:59:19 -05:00 committed by GitHub
parent e42ce64127
commit d821ead92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 723 additions and 696 deletions

View File

@ -25,3 +25,4 @@ indent_size = 2
[*.{yaml,yml}]
indent_style = space
indent_size = 2
quote_type = single

View File

@ -34,12 +34,12 @@ packages:
wifi:
networks:
- ssid: 'MySSID'
password: 'password1'
- ssid: 'MySSID2'
password: ''
channel: 14
bssid: 'A1:63:95:47:D3:1D'
- ssid: 'MySSID'
password: 'password1'
- ssid: 'MySSID2'
password: ''
channel: 14
bssid: 'A1:63:95:47:D3:1D'
manual_ip:
static_ip: 192.168.178.230
gateway: 192.168.178.1
@ -80,47 +80,47 @@ mqtt:
ESP_LOGD("main", "Got message %s", x.c_str());
- topic: livingroom/ota_mode
then:
- deep_sleep.prevent
- deep_sleep.prevent
- topic: livingroom/ota_mode
then:
- deep_sleep.enter:
- deep_sleep.enter:
on_json_message:
topic: the/topic
then:
- if:
condition:
- wifi.connected:
- mqtt.connected:
- light.is_on: kitchen
- light.is_off: kitchen
then:
- lambda: |-
int data = x["my_data"];
ESP_LOGD("main", "The data is: %d", data);
- light.turn_on:
id: living_room_lights
brightness: !lambda |-
float brightness = 1.0;
if (x.containsKey("brightness"))
brightness = x["brightness"];
return brightness;
effect: !lambda |-
const char *effect = "None";
if (x.containsKey("effect"))
effect = x["effect"];
return effect;
- light.control:
id: living_room_lights
brightness: !lambda 'return id(living_room_lights).current_values.get_brightness() + 0.5;'
- light.dim_relative:
id: living_room_lights
relative_brightness: 5%
- uart.write:
id: uart0
data: Hello World
- uart.write: [0x00, 0x20, 0x30]
- uart.write: !lambda |-
return {};
- if:
condition:
- wifi.connected:
- mqtt.connected:
- light.is_on: kitchen
- light.is_off: kitchen
then:
- lambda: |-
int data = x["my_data"];
ESP_LOGD("main", "The data is: %d", data);
- light.turn_on:
id: living_room_lights
brightness: !lambda |-
float brightness = 1.0;
if (x.containsKey("brightness"))
brightness = x["brightness"];
return brightness;
effect: !lambda |-
const char *effect = "None";
if (x.containsKey("effect"))
effect = x["effect"];
return effect;
- light.control:
id: living_room_lights
brightness: !lambda 'return id(living_room_lights).current_values.get_brightness() + 0.5;'
- light.dim_relative:
id: living_room_lights
relative_brightness: 5%
- uart.write:
id: uart0
data: Hello World
- uart.write: [0x00, 0x20, 0x30]
- uart.write: !lambda |-
return {};
i2c:
sda: 21
@ -198,11 +198,11 @@ adalight:
sensor:
- platform: adc
pin: A0
name: "Living Room Brightness"
name: 'Living Room Brightness'
update_interval: '1:01'
attenuation: 2.5db
unit_of_measurement: "°C"
icon: "mdi:water-percent"
unit_of_measurement: '°C'
icon: 'mdi:water-percent'
accuracy_decimals: 5
expire_after: 120s
setup_priority: -100
@ -211,9 +211,9 @@ sensor:
- offset: 2.0
- multiply: 1.2
- calibrate_linear:
- 0.0 -> 0.0
- 40.0 -> 45.0
- 100.0 -> 102.5
- 0.0 -> 0.0
- 40.0 -> 45.0
- 100.0 -> 102.5
- filter_out: 42.0
- filter_out: nan
- median:
@ -232,8 +232,8 @@ sensor:
- debounce: 0.1s
- delta: 5.0
- or:
- throttle: 1s
- delta: 5.0
- throttle: 1s
- delta: 5.0
- lambda: return x * (9.0/5.0) + 32.0;
on_value:
then:
@ -255,9 +255,9 @@ sensor:
ESP_LOGD("main", "Got raw value %f", x);
- logger.log:
level: DEBUG
format: "Got raw value %f"
format: 'Got raw value %f'
args: ['x']
- logger.log: "Got raw value NAN"
- logger.log: 'Got raw value NAN'
- mqtt.publish:
topic: some/topic
payload: Hello
@ -277,48 +277,48 @@ sensor:
cs_pin: 5
phase_a:
voltage:
name: "EMON Line Voltage A"
name: 'EMON Line Voltage A'
current:
name: "EMON CT1 Current"
name: 'EMON CT1 Current'
power:
name: "EMON Active Power CT1"
name: 'EMON Active Power CT1'
reactive_power:
name: "EMON Reactive Power CT1"
name: 'EMON Reactive Power CT1'
power_factor:
name: "EMON Power Factor CT1"
name: 'EMON Power Factor CT1'
gain_voltage: 7305
gain_ct: 27961
phase_b:
current:
name: "EMON CT2 Current"
name: 'EMON CT2 Current'
power:
name: "EMON Active Power CT2"
name: 'EMON Active Power CT2'
reactive_power:
name: "EMON Reactive Power CT2"
name: 'EMON Reactive Power CT2'
power_factor:
name: "EMON Power Factor CT2"
name: 'EMON Power Factor CT2'
gain_voltage: 7305
gain_ct: 27961
phase_c:
current:
name: "EMON CT3 Current"
name: 'EMON CT3 Current'
power:
name: "EMON Active Power CT3"
name: 'EMON Active Power CT3'
reactive_power:
name: "EMON Reactive Power CT3"
name: 'EMON Reactive Power CT3'
power_factor:
name: "EMON Power Factor CT3"
name: 'EMON Power Factor CT3'
gain_voltage: 7305
gain_ct: 27961
frequency:
name: "EMON Line Frequency"
name: 'EMON Line Frequency'
chip_temperature:
name: "EMON Chip Temp A"
name: 'EMON Chip Temp A'
line_frequency: 60Hz
current_phases: 3
gain_pga: 2X
- platform: bh1750
name: "Living Room Brightness 3"
name: 'Living Room Brightness 3'
internal: true
address: 0x23
resolution: 1.0
@ -329,27 +329,27 @@ sensor:
measurement_time: 31
- platform: bme280
temperature:
name: "Outside Temperature"
name: 'Outside Temperature'
oversampling: 16x
pressure:
name: "Outside Pressure"
name: 'Outside Pressure'
oversampling: none
humidity:
name: "Outside Humidity"
name: 'Outside Humidity'
oversampling: 8x
address: 0x77
iir_filter: 16x
update_interval: 15s
- platform: bme680
temperature:
name: "Outside Temperature"
name: 'Outside Temperature'
oversampling: 16x
pressure:
name: "Outside Pressure"
name: 'Outside Pressure'
humidity:
name: "Outside Humidity"
name: 'Outside Humidity'
gas_resistance:
name: "Outside Gas Sensor"
name: 'Outside Gas Sensor'
address: 0x77
heater:
temperature: 320
@ -357,65 +357,65 @@ sensor:
update_interval: 15s
- platform: bmp085
temperature:
name: "Outside Temperature"
name: 'Outside Temperature'
pressure:
name: "Outside Pressure"
name: 'Outside Pressure'
filters:
- lambda: >-
return x / powf(1.0 - (x / 44330.0), 5.255);
update_interval: 15s
- platform: bmp280
temperature:
name: "Outside Temperature"
name: 'Outside Temperature'
oversampling: 16x
pressure:
name: "Outside Pressure"
name: 'Outside Pressure'
address: 0x77
update_interval: 15s
iir_filter: 16x
- platform: dallas
address: 0x1C0000031EDD2A28
name: "Living Room Temperature"
name: 'Living Room Temperature'
resolution: 9
- platform: dallas
index: 1
name: "Living Room Temperature 2"
name: 'Living Room Temperature 2'
- platform: dht
pin: GPIO26
temperature:
name: "Living Room Temperature 3"
name: 'Living Room Temperature 3'
humidity:
name: "Living Room Humidity 3"
name: 'Living Room Humidity 3'
model: AM2302
update_interval: 15s
- platform: dht12
temperature:
name: "Living Room Temperature 4"
name: 'Living Room Temperature 4'
humidity:
name: "Living Room Humidity 4"
name: 'Living Room Humidity 4'
update_interval: 15s
- platform: duty_cycle
pin: GPIO25
name: Duty Cycle Sensor
- platform: esp32_hall
name: "ESP32 Hall Sensor"
name: 'ESP32 Hall Sensor'
update_interval: 15s
- platform: hdc1080
temperature:
name: "Living Room Temperature 5"
name: 'Living Room Temperature 5'
humidity:
name: "Living Room Pressure 5"
name: 'Living Room Pressure 5'
update_interval: 15s
- platform: hlw8012
sel_pin: 5
cf_pin: 14
cf1_pin: 13
current:
name: "HLW8012 Current"
name: 'HLW8012 Current'
voltage:
name: "HLW8012 Voltage"
name: 'HLW8012 Voltage'
power:
name: "HLW8012 Power"
name: 'HLW8012 Power'
id: hlw8012_power
update_interval: 15s
current_resistor: 0.001 ohm
@ -424,39 +424,39 @@ sensor:
initial_mode: VOLTAGE
- platform: total_daily_energy
power_id: hlw8012_power
name: "HLW8012 Total Daily Energy"
name: 'HLW8012 Total Daily Energy'
- platform: integration
sensor: hlw8012_power
name: "Integration Sensor"
name: 'Integration Sensor'
time_unit: s
- platform: hmc5883l
address: 0x68
field_strength_x:
name: "HMC5883L Field Strength X"
name: 'HMC5883L Field Strength X'
field_strength_y:
name: "HMC5883L Field Strength Y"
name: 'HMC5883L Field Strength Y'
field_strength_z:
name: "HMC5883L Field Strength Z"
name: 'HMC5883L Field Strength Z'
heading:
name: "HMC5883L Heading"
name: 'HMC5883L Heading'
range: 130uT
oversampling: 8x
update_interval: 15s
- platform: qmc5883l
address: 0x0D
field_strength_x:
name: "QMC5883L Field Strength X"
name: 'QMC5883L Field Strength X'
field_strength_y:
name: "QMC5883L Field Strength Y"
name: 'QMC5883L Field Strength Y'
field_strength_z:
name: "QMC5883L Field Strength Z"
name: 'QMC5883L Field Strength Z'
heading:
name: "QMC5883L Heading"
name: 'QMC5883L Heading'
range: 800uT
oversampling: 256x
update_interval: 15s
- platform: hx711
name: "HX711 Value"
name: 'HX711 Value'
dout_pin: GPIO23
clk_pin: GPIO25
gain: 128
@ -465,13 +465,13 @@ sensor:
address: 0x40
shunt_resistance: 0.1 ohm
current:
name: "INA219 Current"
name: 'INA219 Current'
power:
name: "INA219 Power"
name: 'INA219 Power'
bus_voltage:
name: "INA219 Bus Voltage"
name: 'INA219 Bus Voltage'
shunt_voltage:
name: "INA219 Shunt Voltage"
name: 'INA219 Shunt Voltage'
max_voltage: 32.0V
max_current: 3.2A
update_interval: 15s
@ -479,13 +479,13 @@ sensor:
address: 0x40
shunt_resistance: 0.1 ohm
current:
name: "INA226 Current"
name: 'INA226 Current'
power:
name: "INA226 Power"
name: 'INA226 Power'
bus_voltage:
name: "INA226 Bus Voltage"
name: 'INA226 Bus Voltage'
shunt_voltage:
name: "INA226 Shunt Voltage"
name: 'INA226 Shunt Voltage'
max_current: 3.2A
update_interval: 15s
- platform: ina3221
@ -493,73 +493,73 @@ sensor:
channel_1:
shunt_resistance: 0.1 ohm
current:
name: "INA3221 Channel 1 Current"
name: 'INA3221 Channel 1 Current'
power:
name: "INA3221 Channel 1 Power"
name: 'INA3221 Channel 1 Power'
bus_voltage:
name: "INA3221 Channel 1 Bus Voltage"
name: 'INA3221 Channel 1 Bus Voltage'
shunt_voltage:
name: "INA3221 Channel 1 Shunt Voltage"
name: 'INA3221 Channel 1 Shunt Voltage'
update_interval: 15s
- platform: htu21d
temperature:
name: "Living Room Temperature 6"
name: 'Living Room Temperature 6'
humidity:
name: "Living Room Humidity 6"
name: 'Living Room Humidity 6'
update_interval: 15s
- platform: max6675
name: "Living Room Temperature"
name: 'Living Room Temperature'
cs_pin: GPIO23
update_interval: 15s
- platform: max31855
name: "Den Temperature"
name: 'Den Temperature'
cs_pin: GPIO23
update_interval: 15s
reference_temperature:
name: "MAX31855 Internal Temperature"
name: 'MAX31855 Internal Temperature'
- platform: max31856
name: "BBQ Temperature"
name: 'BBQ Temperature'
cs_pin: GPIO17
update_interval: 15s
mains_filter: 50Hz
- platform: max31865
name: "Water Tank Temperature"
name: 'Water Tank Temperature'
cs_pin: GPIO23
update_interval: 15s
reference_resistance: "430 Ω"
rtd_nominal_resistance: "100 Ω"
reference_resistance: '430 Ω'
rtd_nominal_resistance: '100 Ω'
- platform: mhz19
co2:
name: "MH-Z19 CO2 Value"
name: 'MH-Z19 CO2 Value'
temperature:
name: "MH-Z19 Temperature"
name: 'MH-Z19 Temperature'
update_interval: 15s
automatic_baseline_calibration: false
- platform: mpu6050
address: 0x68
accel_x:
name: "MPU6050 Accel X"
name: 'MPU6050 Accel X'
accel_y:
name: "MPU6050 Accel Y"
name: 'MPU6050 Accel Y'
accel_z:
name: "MPU6050 Accel z"
name: 'MPU6050 Accel z'
gyro_x:
name: "MPU6050 Gyro X"
name: 'MPU6050 Gyro X'
gyro_y:
name: "MPU6050 Gyro Y"
name: 'MPU6050 Gyro Y'
gyro_z:
name: "MPU6050 Gyro z"
name: 'MPU6050 Gyro z'
temperature:
name: "MPU6050 Temperature"
name: 'MPU6050 Temperature'
- platform: ms5611
temperature:
name: "Outside Temperature"
name: 'Outside Temperature'
pressure:
name: "Outside Pressure"
name: 'Outside Pressure'
address: 0x77
update_interval: 15s
- platform: pulse_counter
name: "Pulse Counter"
name: 'Pulse Counter'
pin: GPIO12
count_mode:
rising_edge: INCREMENT
@ -567,15 +567,15 @@ sensor:
internal_filter: 13us
update_interval: 15s
- platform: rotary_encoder
name: "Rotary Encoder"
name: 'Rotary Encoder'
id: rotary_encoder1
pin_a: GPIO23
pin_b: GPIO25
pin_reset: GPIO25
filters:
- or:
- debounce: 0.1s
- delta: 10
- debounce: 0.1s
- delta: 10
resolution: 4
min_value: -10
max_value: 30
@ -587,33 +587,33 @@ sensor:
id: rotary_encoder1
value: !lambda 'return -1;'
on_clockwise:
- logger.log: "Clockwise"
- logger.log: 'Clockwise'
on_anticlockwise:
- logger.log: "Anticlockwise"
- logger.log: 'Anticlockwise'
- platform: pulse_width
name: Pulse Width
pin: GPIO12
- platform: senseair
co2:
name: "SenseAir CO2 Value"
name: 'SenseAir CO2 Value'
update_interval: 15s
- platform: sht3xd
temperature:
name: "Living Room Temperature 8"
name: 'Living Room Temperature 8'
humidity:
name: "Living Room Humidity 8"
name: 'Living Room Humidity 8'
address: 0x44
update_interval: 15s
- platform: sts3x
name: "Living Room Temperature 9"
name: 'Living Room Temperature 9'
address: 0x4A
- platform: scd30
co2:
name: "Living Room CO2 9"
name: 'Living Room CO2 9'
temperature:
name: "Living Room Temperature 9"
name: 'Living Room Temperature 9'
humidity:
name: "Living Room Humidity 9"
name: 'Living Room Humidity 9'
address: 0x61
update_interval: 15s
automatic_self_calibration: true
@ -621,52 +621,52 @@ sensor:
ambient_pressure_compensation: 961mBar
- platform: sgp30
eco2:
name: "Workshop eCO2"
name: 'Workshop eCO2'
accuracy_decimals: 1
tvoc:
name: "Workshop TVOC"
name: 'Workshop TVOC'
accuracy_decimals: 1
address: 0x58
update_interval: 5s
- platform: sps30
pm_1_0:
name: "Workshop PM <1µm Weight concentration"
id: "workshop_PM_1_0"
name: 'Workshop PM <1µm Weight concentration'
id: 'workshop_PM_1_0'
pm_2_5:
name: "Workshop PM <2.5µm Weight concentration"
id: "workshop_PM_2_5"
name: 'Workshop PM <2.5µm Weight concentration'
id: 'workshop_PM_2_5'
pm_4_0:
name: "Workshop PM <4µm Weight concentration"
id: "workshop_PM_4_0"
name: 'Workshop PM <4µm Weight concentration'
id: 'workshop_PM_4_0'
pm_10_0:
name: "Workshop PM <10µm Weight concentration"
id: "workshop_PM_10_0"
name: 'Workshop PM <10µm Weight concentration'
id: 'workshop_PM_10_0'
pmc_0_5:
name: "Workshop PM <0.5µm Number concentration"
id: "workshop_PMC_0_5"
name: 'Workshop PM <0.5µm Number concentration'
id: 'workshop_PMC_0_5'
pmc_1_0:
name: "Workshop PM <1µm Number concentration"
id: "workshop_PMC_1_0"
name: 'Workshop PM <1µm Number concentration'
id: 'workshop_PMC_1_0'
pmc_2_5:
name: "Workshop PM <2.5µm Number concentration"
id: "workshop_PMC_2_5"
name: 'Workshop PM <2.5µm Number concentration'
id: 'workshop_PMC_2_5'
pmc_4_0:
name: "Workshop PM <4µm Number concentration"
id: "workshop_PMC_4_0"
name: 'Workshop PM <4µm Number concentration'
id: 'workshop_PMC_4_0'
pmc_10_0:
name: "Workshop PM <10µm Number concentration"
id: "workshop_PMC_10_0"
name: 'Workshop PM <10µm Number concentration'
id: 'workshop_PMC_10_0'
address: 0x69
update_interval: 10s
- platform: shtcx
temperature:
name: "Living Room Temperature 10"
name: 'Living Room Temperature 10'
humidity:
name: "Living Room Humidity 10"
name: 'Living Room Humidity 10'
address: 0x70
update_interval: 15s
- platform: template
name: "Template Sensor"
name: 'Template Sensor'
id: template_sensor
lambda: |-
if (id(ultrasonic_sensor1).state > 1) {
@ -683,7 +683,7 @@ sensor:
id: template_sensor
state: !lambda 'return NAN;'
- platform: tsl2561
name: "TSL2561 Ambient Light"
name: 'TSL2561 Ambient Light'
address: 0x39
update_interval: 15s
is_cs_package: true
@ -694,17 +694,17 @@ sensor:
echo_pin:
number: GPIO23
inverted: true
name: "Ultrasonic Sensor"
name: 'Ultrasonic Sensor'
timeout: 5.5m
id: ultrasonic_sensor1
- platform: uptime
name: Uptime Sensor
- platform: wifi_signal
name: "WiFi Signal Sensor"
name: 'WiFi Signal Sensor'
update_interval: 15s
- platform: mqtt_subscribe
name: "MQTT Subscribe Sensor 1"
topic: "mqtt/topic"
name: 'MQTT Subscribe Sensor 1'
topic: 'mqtt/topic'
id: the_sensor
qos: 2
on_value:
@ -715,9 +715,9 @@ sensor:
root["greeting"] = "Hello World";
- platform: sds011
pm_2_5:
name: "SDS011 PM2.5"
name: 'SDS011 PM2.5'
pm_10_0:
name: "SDS011 PM10.0"
name: 'SDS011 PM10.0'
update_interval: 5min
rx_only: false
- platform: ccs811
@ -729,9 +729,9 @@ sensor:
baseline: 0x4242
- platform: tx20
wind_speed:
name: "Windspeed"
name: 'Windspeed'
wind_direction_degrees:
name: "Winddirection Degrees"
name: 'Winddirection Degrees'
pin:
number: GPIO04
mode: INPUT
@ -739,55 +739,55 @@ sensor:
clock_pin: GPIO5
data_pin: GPIO4
co2:
name: "ZyAura CO2"
name: 'ZyAura CO2'
temperature:
name: "ZyAura Temperature"
name: 'ZyAura Temperature'
humidity:
name: "ZyAura Humidity"
name: 'ZyAura Humidity'
- platform: as3935
lightning_energy:
name: "Lightning Energy"
name: 'Lightning Energy'
distance:
name: "Distance Storm"
name: 'Distance Storm'
- platform: tmp117
name: "TMP117 Temperature"
name: 'TMP117 Temperature'
update_interval: 5s
- platform: hm3301
pm_1_0:
name: "PM1.0"
name: 'PM1.0'
pm_2_5:
name: "PM2.5"
name: 'PM2.5'
pm_10_0:
name: "PM10.0"
name: 'PM10.0'
aqi:
name: "AQI"
calculation_type: "CAQI"
name: 'AQI'
calculation_type: 'CAQI'
- platform: teleinfo
tags:
- tag_name: "HCHC"
sensor:
name: "hchc"
unit_of_measurement: "Wh"
icon: mdi:flash
- tag_name: "HCHP"
sensor:
name: "hchp"
unit_of_measurement: "Wh"
icon: mdi:flash
- tag_name: "PAPP"
sensor:
name: "papp"
unit_of_measurement: "VA"
icon: mdi:flash
- tag_name: 'HCHC'
sensor:
name: 'hchc'
unit_of_measurement: 'Wh'
icon: mdi:flash
- tag_name: 'HCHP'
sensor:
name: 'hchp'
unit_of_measurement: 'Wh'
icon: mdi:flash
- tag_name: 'PAPP'
sensor:
name: 'papp'
unit_of_measurement: 'VA'
icon: mdi:flash
update_interval: 60s
historical_mode: true
- platform: mcp9808
name: "MCP9808 Temperature"
name: 'MCP9808 Temperature'
update_interval: 15s
- platform: ezo
id: ph_ezo
address: 99
unit_of_measurement: "pH"
unit_of_measurement: 'pH'
esp32_touch:
setup_mode: False
@ -801,7 +801,7 @@ esp32_touch:
binary_sensor:
- platform: gpio
pin: GPIO9
name: "Living Room Window"
name: 'Living Room Window'
device_class: window
filters:
- invert:
@ -828,55 +828,55 @@ binary_sensor:
- min_length: 50ms
max_length: 350ms
then:
- lambda: >-
ESP_LOGD("main", "Double Clicked");
- lambda: >-
ESP_LOGD("main", "Double Clicked");
- then:
- lambda: >-
ESP_LOGD("main", "Double Clicked");
- lambda: >-
ESP_LOGD("main", "Double Clicked");
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at least 0.2s
then:
- logger.log:
format: "Multi Clicked TWO"
level: warn
- timing:
- OFF for 1s to 2s
- ON for 1s to 2s
- OFF for at least 0.5s
then:
- logger.log:
format: "Multi Clicked LONG SINGLE"
level: warn
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- logger.log:
format: "Multi Clicked SINGLE"
level: warn
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at least 0.2s
then:
- logger.log:
format: 'Multi Clicked TWO'
level: warn
- timing:
- OFF for 1s to 2s
- ON for 1s to 2s
- OFF for at least 0.5s
then:
- logger.log:
format: 'Multi Clicked LONG SINGLE'
level: warn
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- logger.log:
format: 'Multi Clicked SINGLE'
level: warn
id: binary_sensor1
- platform: gpio
pin:
number: GPIO9
mode: INPUT_PULLUP
name: "Living Room Window 2"
name: 'Living Room Window 2'
- platform: status
name: "Living Room Status"
name: 'Living Room Status'
- platform: esp32_touch
name: "ESP32 Touch Pad GPIO27"
name: 'ESP32 Touch Pad GPIO27'
pin: GPIO27
threshold: 1000
id: btn_left
- platform: nextion
page_id: 0
component_id: 2
name: "Nextion Component 2 Touch"
name: 'Nextion Component 2 Touch'
- platform: template
name: "Garage Door Open"
name: 'Garage Door Open'
id: garage_door
lambda: |-
if (isnan(id(my_sensor).state)) {
@ -903,33 +903,33 @@ binary_sensor:
frequency: !lambda 'return 500.0;'
- platform: pn532
uid: 74-10-37-94
name: "PN532 NFC Tag"
name: 'PN532 NFC Tag'
- platform: rdm6300
uid: 7616525
name: "RDM6300 NFC Tag"
name: 'RDM6300 NFC Tag'
- platform: gpio
name: "PCF binary sensor"
name: 'PCF binary sensor'
pin:
pcf8574: pcf8574_hub
number: 1
mode: INPUT
inverted: True
- platform: gpio
name: "MCP21 binary sensor"
name: 'MCP21 binary sensor'
pin:
mcp23017: mcp23017_hub
number: 1
mode: INPUT
inverted: True
- platform: gpio
name: "MCP22 binary sensor"
name: 'MCP22 binary sensor'
pin:
mcp23008: mcp23008_hub
number: 7
mode: INPUT_PULLUP
inverted: False
- platform: gpio
name: "MCP23 binary sensor"
name: 'MCP23 binary sensor'
pin:
mcp23016: mcp23016_hub
number: 7
@ -937,14 +937,48 @@ binary_sensor:
inverted: False
- platform: remote_receiver
name: "Raw Remote Receiver Test"
name: 'Raw Remote Receiver Test'
raw:
code: [5685, -4252, 1711, -2265, 1712, -2265, 1711, -2264, 1712, -2266,
3700, -2263, 1712, -4254, 1711, -4249, 1715, -2266, 1710, -2267,
1709, -2265, 3704, -4250, 1712, -4254, 3700, -2260, 1714, -2265,
1712, -2262, 1714, -2267, 1709]
code:
[
5685,
-4252,
1711,
-2265,
1712,
-2265,
1711,
-2264,
1712,
-2266,
3700,
-2263,
1712,
-4254,
1711,
-4249,
1715,
-2266,
1710,
-2267,
1709,
-2265,
3704,
-4250,
1712,
-4254,
3700,
-2260,
1714,
-2265,
1712,
-2262,
1714,
-2267,
1709,
]
- platform: as3935
name: "Storm Alert"
name: 'Storm Alert'
pca9685:
frequency: 500
@ -1099,12 +1133,12 @@ e131:
light:
- platform: binary
name: "Desk Lamp"
name: 'Desk Lamp'
output: gpio_26
effects:
- strobe:
- strobe:
name: "My Strobe"
name: 'My Strobe'
colors:
- state: True
duration: 250ms
@ -1119,7 +1153,7 @@ light:
id: livingroom_lights
state: yes
- platform: monochromatic
name: "Kitchen Lights"
name: 'Kitchen Lights'
id: kitchen
output: gpio_19
gamma_correct: 2.8
@ -1128,7 +1162,7 @@ light:
- strobe:
- flicker:
- flicker:
name: "My Flicker"
name: 'My Flicker'
alpha: 98%
intensity: 1.5%
- lambda:
@ -1140,20 +1174,20 @@ light:
if (state == 4)
state = 0;
- platform: rgb
name: "Living Room Lights"
name: 'Living Room Lights'
id: living_room_lights
red: pca_0
green: pca_1
blue: pca_2
- platform: rgbw
name: "Living Room Lights 2"
name: 'Living Room Lights 2'
red: pca_3
green: pca_4
blue: pca_5
white: pca_6
color_interlock: true
- platform: rgbww
name: "Living Room Lights 2"
name: 'Living Room Lights 2'
red: pca_3
green: pca_4
blue: pca_5
@ -1163,7 +1197,7 @@ light:
warm_white_color_temperature: 500 mireds
color_interlock: true
- platform: cwww
name: "Living Room Lights 2"
name: 'Living Room Lights 2'
cold_white: pca_6
warm_white: pca_6
cold_white_color_temperature: 153 mireds
@ -1178,77 +1212,77 @@ light:
max_refresh_rate: 20ms
power_supply: atx_power_supply
color_correct: [75%, 100%, 50%]
name: "FastLED WS2811 Light"
name: 'FastLED WS2811 Light'
effects:
- addressable_color_wipe:
- addressable_color_wipe:
name: Color Wipe Effect With Custom Values
colors:
- red: 100%
green: 100%
blue: 100%
num_leds: 1
- red: 0%
green: 0%
blue: 0%
num_leds: 1
add_led_interval: 100ms
reverse: False
- addressable_scan:
- addressable_scan:
name: Scan Effect With Custom Values
move_interval: 100ms
- addressable_twinkle:
- addressable_twinkle:
name: Twinkle Effect With Custom Values
twinkle_probability: 5%
progress_interval: 4ms
- addressable_random_twinkle:
- addressable_random_twinkle:
name: Random Twinkle Effect With Custom Values
twinkle_probability: 5%
progress_interval: 32ms
- addressable_fireworks:
- addressable_fireworks:
name: Fireworks Effect With Custom Values
update_interval: 32ms
spark_probability: 10%
use_random_color: false
fade_out_rate: 120
- addressable_flicker:
- addressable_flicker:
name: Flicker Effect With Custom Values
update_interval: 16ms
intensity: 5%
- addressable_lambda:
name: "Test For Custom Lambda Effect"
- addressable_color_wipe:
- addressable_color_wipe:
name: Color Wipe Effect With Custom Values
colors:
- red: 100%
green: 100%
blue: 100%
num_leds: 1
- red: 0%
green: 0%
blue: 0%
num_leds: 1
add_led_interval: 100ms
reverse: False
- addressable_scan:
- addressable_scan:
name: Scan Effect With Custom Values
move_interval: 100ms
- addressable_twinkle:
- addressable_twinkle:
name: Twinkle Effect With Custom Values
twinkle_probability: 5%
progress_interval: 4ms
- addressable_random_twinkle:
- addressable_random_twinkle:
name: Random Twinkle Effect With Custom Values
twinkle_probability: 5%
progress_interval: 32ms
- addressable_fireworks:
- addressable_fireworks:
name: Fireworks Effect With Custom Values
update_interval: 32ms
spark_probability: 10%
use_random_color: false
fade_out_rate: 120
- addressable_flicker:
- addressable_flicker:
name: Flicker Effect With Custom Values
update_interval: 16ms
intensity: 5%
- addressable_lambda:
name: 'Test For Custom Lambda Effect'
lambda: |-
if (initial_run) {
it[0] = current_color;
}
- wled:
port: 11111
- wled:
port: 11111
- adalight:
uart_id: adalight_uart
- adalight:
uart_id: adalight_uart
- automation:
name: Custom Effect
sequence:
- light.addressable_set:
id: addr1
red: 100%
green: 100%
blue: 0%
- delay: 100ms
- light.addressable_set:
id: addr1
red: 0%
green: 100%
blue: 0%
- e131:
universe: 1
- automation:
name: Custom Effect
sequence:
- light.addressable_set:
id: addr1
red: 100%
green: 100%
blue: 0%
- delay: 100ms
- light.addressable_set:
id: addr1
red: 0%
green: 100%
blue: 0%
- e131:
universe: 1
- platform: fastled_spi
id: addr2
chipset: WS2801
@ -1257,26 +1291,26 @@ light:
data_rate: 2MHz
num_leds: 60
rgb_order: BRG
name: "FastLED SPI Light"
name: 'FastLED SPI Light'
- platform: neopixelbus
id: addr3
name: "Neopixelbus Light"
name: 'Neopixelbus Light'
gamma_correct: 2.8
color_correct: [0.0, 0.0, 0.0, 0.0]
default_transition_length: 10s
power_supply: atx_power_supply
effects:
- addressable_flicker:
name: Flicker Effect With Custom Values
update_interval: 16ms
intensity: 5%
- addressable_flicker:
name: Flicker Effect With Custom Values
update_interval: 16ms
intensity: 5%
type: GRBW
variant: SK6812
method: ESP32_I2S_0
num_leds: 60
pin: GPIO23
- platform: partition
name: "Partition Light"
name: 'Partition Light'
segments:
- id: addr1
from: 0
@ -1327,8 +1361,8 @@ climate:
switch:
- platform: gpio
pin: GPIO25
name: "Living Room Dehumidifier"
icon: "mdi:restart"
name: 'Living Room Dehumidifier'
icon: 'mdi:restart'
inverted: True
command_topic: custom_command_topic
restore_mode: ALWAYS_OFF
@ -1434,35 +1468,35 @@ switch:
optimistic: True
assumed_state: yes
turn_on_action:
- switch.turn_on: living_room_lights_on
- output.set_level:
id: gpio_19
level: 50%
- output.set_level:
id: gpio_19
level: !lambda 'return 0.5;'
- output.set_level:
id: dac_output
level: 50%
- output.set_level:
id: dac_output
level: !lambda 'return 0.5;'
- switch.turn_on: living_room_lights_on
- output.set_level:
id: gpio_19
level: 50%
- output.set_level:
id: gpio_19
level: !lambda 'return 0.5;'
- output.set_level:
id: dac_output
level: 50%
- output.set_level:
id: dac_output
level: !lambda 'return 0.5;'
turn_off_action:
- switch.turn_on: living_room_lights_off
- switch.turn_on: living_room_lights_off
restore_state: False
on_turn_on:
- switch.template.publish:
id: livingroom_lights
state: yes
- platform: restart
name: "Living Room Restart"
name: 'Living Room Restart'
- platform: shutdown
name: "Living Room Shutdown"
name: 'Living Room Shutdown'
- platform: output
name: "Generic Output"
name: 'Generic Output'
output: pca_6
- platform: template
name: "Template Switch"
name: 'Template Switch'
id: my_switch
lambda: |-
if (id(binary_sensor1).state) {
@ -1487,30 +1521,30 @@ switch:
id: my_switch
state: !lambda 'return false;'
- platform: uart
name: "UART String Output"
name: 'UART String Output'
data: 'DataToSend'
- platform: uart
name: "UART Bytes Output"
name: 'UART Bytes Output'
data: [0xDE, 0xAD, 0xBE, 0xEF]
- platform: template
assumed_state: yes
name: Stepper Switch
turn_on_action:
- stepper.set_target:
id: my_stepper
target: !lambda |-
static int32_t i = 0;
i += 1000;
if (i > 5000) {
i = -5000;
}
return i;
- stepper.report_position:
id: my_stepper
position: 0
- stepper.set_target:
id: my_stepper
target: !lambda |-
static int32_t i = 0;
i += 1000;
if (i > 5000) {
i = -5000;
}
return i;
- stepper.report_position:
id: my_stepper
position: 0
- platform: gpio
name: "SN74HC595 Pin #0"
name: 'SN74HC595 Pin #0'
pin:
sn74hc595: sn74hc595_hub
# Use pin number 0
@ -1520,12 +1554,12 @@ switch:
fan:
- platform: binary
output: gpio_26
name: "Living Room Fan 1"
name: 'Living Room Fan 1'
oscillation_output: gpio_19
direction_output: gpio_26
- platform: speed
output: pca_6
name: "Living Room Fan 2"
name: 'Living Room Fan 2'
oscillation_output: gpio_19
direction_output: gpio_26
speed:
@ -1540,20 +1574,20 @@ fan:
interval:
- interval: 10s
then:
- display.page.show: !lambda |-
if (true) return id(page1); else return id(page2);
- display.page.show_next: display1
- display.page.show_previous: display1
- display.page.show: !lambda |-
if (true) return id(page1); else return id(page2);
- display.page.show_next: display1
- display.page.show_previous: display1
- interval: 2s
then:
- lambda: |-
static uint16_t btn_left_state = id(btn_left)->get_value();
static uint16_t btn_left_state = id(btn_left)->get_value();
ESP_LOGD("adaptive touch", "___ Touch Pad '%s' (T%u): val: %u state: %u tres:%u", id(btn_left)->get_name().c_str(), id(btn_left)->get_touch_pad(), id(btn_left)->get_value(), btn_left_state, id(btn_left)->get_threshold());
ESP_LOGD("adaptive touch", "___ Touch Pad '%s' (T%u): val: %u state: %u tres:%u", id(btn_left)->get_name().c_str(), id(btn_left)->get_touch_pad(), id(btn_left)->get_value(), btn_left_state, id(btn_left)->get_threshold());
btn_left_state = ((uint32_t) id(btn_left)->get_value() + 63 * (uint32_t)btn_left_state) >> 6;
btn_left_state = ((uint32_t) id(btn_left)->get_value() + 63 * (uint32_t)btn_left_state) >> 6;
id(btn_left)->set_threshold(btn_left_state * 0.9);
id(btn_left)->set_threshold(btn_left_state * 0.9);
color:
- id: kbx_red
@ -1566,110 +1600,110 @@ color:
blue: 100%
display:
- platform: lcd_gpio
dimensions: 18x4
data_pins:
- GPIO19
- GPIO21
- GPIO22
- GPIO23
enable_pin: GPIO23
rs_pin: GPIO25
lambda: |-
it.print("Hello World!");
- platform: lcd_pcf8574
dimensions: 18x4
address: 0x3F
lambda: |-
it.print("Hello World!");
- platform: max7219
cs_pin: GPIO23
num_chips: 1
lambda: |-
it.print("01234567");
- platform: tm1637
clk_pin: GPIO23
dio_pin: GPIO25
intensity: 3
lambda: |-
- platform: lcd_gpio
dimensions: 18x4
data_pins:
- GPIO19
- GPIO21
- GPIO22
- GPIO23
enable_pin: GPIO23
rs_pin: GPIO25
lambda: |-
it.print("Hello World!");
- platform: lcd_pcf8574
dimensions: 18x4
address: 0x3F
lambda: |-
it.print("Hello World!");
- platform: max7219
cs_pin: GPIO23
num_chips: 1
lambda: |-
it.print("01234567");
- platform: tm1637
clk_pin: GPIO23
dio_pin: GPIO25