mirror of
https://github.com/esphome/esphome.git
synced 2026-05-22 10:25:46 +08:00
Add some components to the new testing framework (C) (#6174)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: esp32_internal_can
|
||||
rx_pin: 4
|
||||
tx_pin: 5
|
||||
can_id: 4
|
||||
bit_rate: 50kbps
|
||||
on_frame:
|
||||
- can_id: 500
|
||||
then:
|
||||
- lambda: |-
|
||||
std::string b(x.begin(), x.end());
|
||||
ESP_LOGD("canid 500", "%s", b.c_str());
|
||||
- can_id: 23
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return x[0] == 0x11;"
|
||||
then:
|
||||
logger.log: Truth
|
||||
- can_id: 0b00000000000000000000001000000
|
||||
can_id_mask: 0b11111000000000011111111000000
|
||||
use_extended_id: true
|
||||
then:
|
||||
- lambda: |-
|
||||
auto pdo_id = can_id >> 14;
|
||||
switch (pdo_id)
|
||||
{
|
||||
case 117:
|
||||
ESP_LOGD("canbus", "exhaust_fan_duty");
|
||||
break;
|
||||
case 118:
|
||||
ESP_LOGD("canbus", "supply_fan_duty");
|
||||
break;
|
||||
case 119:
|
||||
ESP_LOGD("canbus", "supply_fan_flow");
|
||||
break;
|
||||
}
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Canbus Actions
|
||||
on_press:
|
||||
- canbus.send: "abc"
|
||||
- canbus.send: [0, 1, 2]
|
||||
- canbus.send: !lambda return {0, 1, 2};
|
||||
@@ -0,0 +1,46 @@
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: esp32_internal_can
|
||||
rx_pin: 4
|
||||
tx_pin: 5
|
||||
can_id: 4
|
||||
bit_rate: 50kbps
|
||||
on_frame:
|
||||
- can_id: 500
|
||||
then:
|
||||
- lambda: |-
|
||||
std::string b(x.begin(), x.end());
|
||||
ESP_LOGD("canid 500", "%s", b.c_str());
|
||||
- can_id: 23
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return x[0] == 0x11;"
|
||||
then:
|
||||
logger.log: Truth
|
||||
- can_id: 0b00000000000000000000001000000
|
||||
can_id_mask: 0b11111000000000011111111000000
|
||||
use_extended_id: true
|
||||
then:
|
||||
- lambda: |-
|
||||
auto pdo_id = can_id >> 14;
|
||||
switch (pdo_id)
|
||||
{
|
||||
case 117:
|
||||
ESP_LOGD("canbus", "exhaust_fan_duty");
|
||||
break;
|
||||
case 118:
|
||||
ESP_LOGD("canbus", "supply_fan_duty");
|
||||
break;
|
||||
case 119:
|
||||
ESP_LOGD("canbus", "supply_fan_flow");
|
||||
break;
|
||||
}
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Canbus Actions
|
||||
on_press:
|
||||
- canbus.send: "abc"
|
||||
- canbus.send: [0, 1, 2]
|
||||
- canbus.send: !lambda return {0, 1, 2};
|
||||
@@ -0,0 +1,46 @@
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: esp32_internal_can
|
||||
rx_pin: 4
|
||||
tx_pin: 5
|
||||
can_id: 4
|
||||
bit_rate: 50kbps
|
||||
on_frame:
|
||||
- can_id: 500
|
||||
then:
|
||||
- lambda: |-
|
||||
std::string b(x.begin(), x.end());
|
||||
ESP_LOGD("canid 500", "%s", b.c_str());
|
||||
- can_id: 23
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return x[0] == 0x11;"
|
||||
then:
|
||||
logger.log: Truth
|
||||
- can_id: 0b00000000000000000000001000000
|
||||
can_id_mask: 0b11111000000000011111111000000
|
||||
use_extended_id: true
|
||||
then:
|
||||
- lambda: |-
|
||||
auto pdo_id = can_id >> 14;
|
||||
switch (pdo_id)
|
||||
{
|
||||
case 117:
|
||||
ESP_LOGD("canbus", "exhaust_fan_duty");
|
||||
break;
|
||||
case 118:
|
||||
ESP_LOGD("canbus", "supply_fan_duty");
|
||||
break;
|
||||
case 119:
|
||||
ESP_LOGD("canbus", "supply_fan_flow");
|
||||
break;
|
||||
}
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Canbus Actions
|
||||
on_press:
|
||||
- canbus.send: "abc"
|
||||
- canbus.send: [0, 1, 2]
|
||||
- canbus.send: !lambda return {0, 1, 2};
|
||||
@@ -0,0 +1,46 @@
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: esp32_internal_can
|
||||
rx_pin: 4
|
||||
tx_pin: 5
|
||||
can_id: 4
|
||||
bit_rate: 50kbps
|
||||
on_frame:
|
||||
- can_id: 500
|
||||
then:
|
||||
- lambda: |-
|
||||
std::string b(x.begin(), x.end());
|
||||
ESP_LOGD("canid 500", "%s", b.c_str());
|
||||
- can_id: 23
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return x[0] == 0x11;"
|
||||
then:
|
||||
logger.log: Truth
|
||||
- can_id: 0b00000000000000000000001000000
|
||||
can_id_mask: 0b11111000000000011111111000000
|
||||
use_extended_id: true
|
||||
then:
|
||||
- lambda: |-
|
||||
auto pdo_id = can_id >> 14;
|
||||
switch (pdo_id)
|
||||
{
|
||||
case 117:
|
||||
ESP_LOGD("canbus", "exhaust_fan_duty");
|
||||
break;
|
||||
case 118:
|
||||
ESP_LOGD("canbus", "supply_fan_duty");
|
||||
break;
|
||||
case 119:
|
||||
ESP_LOGD("canbus", "supply_fan_flow");
|
||||
break;
|
||||
}
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Canbus Actions
|
||||
on_press:
|
||||
- canbus.send: "abc"
|
||||
- canbus.send: [0, 1, 2]
|
||||
- canbus.send: !lambda return {0, 1, 2};
|
||||
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 6
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 6
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 15
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 15
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 15
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
@@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 6
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
@@ -0,0 +1,5 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
captive_portal:
|
||||
@@ -0,0 +1,5 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
captive_portal:
|
||||
@@ -0,0 +1,5 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
captive_portal:
|
||||
@@ -0,0 +1,5 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
captive_portal:
|
||||
@@ -0,0 +1,5 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
captive_portal:
|
||||
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 16
|
||||
sda: 17
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
@@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
@@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 2
|
||||
pin_s1: 3
|
||||
pin_s2: 4
|
||||
pin_s3: 5
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 0
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
||||
@@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 2
|
||||
pin_s1: 3
|
||||
pin_s2: 4
|
||||
pin_s3: 5
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 0
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
||||
@@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 12
|
||||
pin_s1: 13
|
||||
pin_s2: 14
|
||||
pin_s3: 15
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 39
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
||||
@@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 12
|
||||
pin_s1: 13
|
||||
pin_s2: 14
|
||||
pin_s3: 15
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 39
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
||||
@@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 12
|
||||
pin_s1: 13
|
||||
pin_s2: 14
|
||||
pin_s3: 15
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: A0
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
||||
@@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 2
|
||||
pin_s1: 3
|
||||
pin_s2: 4
|
||||
pin_s3: 5
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 26
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
||||
@@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
@@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
@@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
@@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
@@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: 5
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
@@ -0,0 +1,11 @@
|
||||
color:
|
||||
- id: kbx_red
|
||||
red: 100%
|
||||
green_int: 123
|
||||
blue: 2%
|
||||
- id: kbx_blue
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
@@ -0,0 +1,11 @@
|
||||
color:
|
||||
- id: kbx_red
|
||||
red: 100%
|
||||
green_int: 123
|
||||
blue: 2%
|
||||
- id: kbx_blue
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
@@ -0,0 +1,11 @@
|
||||
color:
|
||||
- id: kbx_red
|
||||
red: 100%
|
||||
green_int: 123
|
||||
blue: 2%
|
||||
- id: kbx_blue
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
@@ -0,0 +1,11 @@
|
||||
color:
|
||||
- id: kbx_red
|
||||
red: 100%
|
||||
green_int: 123
|
||||
blue: 2%
|
||||
- id: kbx_blue
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
@@ -0,0 +1,11 @@
|
||||
color:
|
||||
- id: kbx_red
|
||||
red: 100%
|
||||
green_int: 123
|
||||
blue: 2%
|
||||
- id: kbx_blue
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
@@ -0,0 +1,11 @@
|
||||
color:
|
||||
- id: kbx_red
|
||||
red: 100%
|
||||
green_int: 123
|
||||
blue: 2%
|
||||
- id: kbx_blue
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
@@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 2
|
||||
|
||||
light:
|
||||
- platform: color_temperature
|
||||
name: Lights
|
||||
color_temperature: light_output_1
|
||||
brightness: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
@@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 2
|
||||
|
||||
light:
|
||||
- platform: color_temperature
|
||||
name: Lights
|
||||
color_temperature: light_output_1
|
||||
brightness: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
@@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
|
||||
light:
|
||||
- platform: color_temperature
|
||||
name: Lights
|
||||
color_temperature: light_output_1
|
||||
brightness: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
@@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
|
||||
light:
|
||||
- platform: color_temperature
|
||||
name: Lights
|
||||
color_temperature: light_output_1
|
||||
brightness: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
@@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
|
||||
light:
|
||||
- platform: color_temperature
|
||||
name: Lights
|
||||
color_temperature: light_output_1
|
||||
brightness: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
@@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
|
||||
light:
|
||||
- platform: color_temperature
|
||||
name: Lights
|
||||
color_temperature: light_output_1
|
||||
brightness: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_temperature1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature2
|
||||
lambda: |-
|
||||
if (millis() > 20000) {
|
||||
return 0.8;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: combination
|
||||
type: kalman
|
||||
name: Kalman-filtered temperature
|
||||
process_std_dev: 0.00139
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
error: 1.5
|
||||
- platform: combination
|
||||
type: linear
|
||||
name: Linearly combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
coeffecient: 1.5
|
||||
- platform: combination
|
||||
type: max
|
||||
name: Max of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: mean
|
||||
name: Mean of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: median
|
||||
name: Median of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: min
|
||||
name: Min of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: most_recently_updated
|
||||
name: Most recently updated of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: range
|
||||
name: Range of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: sum
|
||||
name: Sum of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_temperature1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature2
|
||||
lambda: |-
|
||||
if (millis() > 20000) {
|
||||
return 0.8;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: combination
|
||||
type: kalman
|
||||
name: Kalman-filtered temperature
|
||||
process_std_dev: 0.00139
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
error: 1.5
|
||||
- platform: combination
|
||||
type: linear
|
||||
name: Linearly combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
coeffecient: 1.5
|
||||
- platform: combination
|
||||
type: max
|
||||
name: Max of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: mean
|
||||
name: Mean of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: median
|
||||
name: Median of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: min
|
||||
name: Min of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: most_recently_updated
|
||||
name: Most recently updated of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: range
|
||||
name: Range of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: sum
|
||||
name: Sum of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_temperature1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature2
|
||||
lambda: |-
|
||||
if (millis() > 20000) {
|
||||
return 0.8;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: combination
|
||||
type: kalman
|
||||
name: Kalman-filtered temperature
|
||||
process_std_dev: 0.00139
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
error: 1.5
|
||||
- platform: combination
|
||||
type: linear
|
||||
name: Linearly combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
coeffecient: 1.5
|
||||
- platform: combination
|
||||
type: max
|
||||
name: Max of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: mean
|
||||
name: Mean of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: median
|
||||
name: Median of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: min
|
||||
name: Min of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: most_recently_updated
|
||||
name: Most recently updated of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: range
|
||||
name: Range of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: sum
|
||||
name: Sum of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_temperature1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature2
|
||||
lambda: |-
|
||||
if (millis() > 20000) {
|
||||
return 0.8;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: combination
|
||||
type: kalman
|
||||
name: Kalman-filtered temperature
|
||||
process_std_dev: 0.00139
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
error: 1.5
|
||||
- platform: combination
|
||||
type: linear
|
||||
name: Linearly combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
coeffecient: 1.5
|
||||
- platform: combination
|
||||
type: max
|
||||
name: Max of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: mean
|
||||
name: Mean of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: median
|
||||
name: Median of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: min
|
||||
name: Min of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: most_recently_updated
|
||||
name: Most recently updated of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: range
|
||||
name: Range of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: sum
|
||||
name: Sum of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_temperature1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature2
|
||||
lambda: |-
|
||||
if (millis() > 20000) {
|
||||
return 0.8;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: combination
|
||||
type: kalman
|
||||
name: Kalman-filtered temperature
|
||||
process_std_dev: 0.00139
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
error: 1.5
|
||||
- platform: combination
|
||||
type: linear
|
||||
name: Linearly combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
coeffecient: 1.5
|
||||
- platform: combination
|
||||
type: max
|
||||
name: Max of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: mean
|
||||
name: Mean of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: median
|
||||
name: Median of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: min
|
||||
name: Min of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: most_recently_updated
|
||||
name: Most recently updated of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: range
|
||||
name: Range of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: sum
|
||||
name: Sum of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
@@ -0,0 +1,76 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: template_temperature1
|
||||
lambda: |-
|
||||
if (millis() > 10000) {
|
||||
return 0.6;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: template
|
||||
id: template_temperature2
|
||||
lambda: |-
|
||||
if (millis() > 20000) {
|
||||
return 0.8;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
- platform: combination
|
||||
type: kalman
|
||||
name: Kalman-filtered temperature
|
||||
process_std_dev: 0.00139
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
error: 1.5
|
||||
- platform: combination
|
||||
type: linear
|
||||
name: Linearly combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
||||
- source: template_temperature2
|
||||
coeffecient: 1.5
|
||||
- platform: combination
|
||||
type: max
|
||||
name: Max of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: mean
|
||||
name: Mean of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: median
|
||||
name: Median of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: min
|
||||
name: Min of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: most_recently_updated
|
||||
name: Most recently updated of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: range
|
||||
name: Range of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
- platform: combination
|
||||
type: sum
|
||||
name: Sum of combined temperatures
|
||||
sources:
|
||||
- source: template_temperature1
|
||||
- source: template_temperature2
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user