Add some components to the new testing framework (C) (#6174)

This commit is contained in:
Keith Burzinski
2024-02-08 10:55:20 +13:00
committed by GitHub
parent a91937dca5
commit 3eaf59cc5a
97 changed files with 2217 additions and 0 deletions
@@ -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};
+46
View File
@@ -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
+11
View File
@@ -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
+11
View File
@@ -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
+13
View File
@@ -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
+13
View File
@@ -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

Some files were not shown because too many files have changed in this diff Show More