mirror of
https://github.com/esphome/esphome.git
synced 2025-03-12 05:38:16 +00:00
[CI] Consolidate some tests (C) (#8186)
This commit is contained in:
parent
53c15f6716
commit
61ad2510fc
11
tests/components/cap1188/common.yaml
Normal file
11
tests/components/cap1188/common.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: ${reset_pin}
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
@ -1,11 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
reset_pin: GPIO15
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 15
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,11 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 6
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,11 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 6
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,11 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
reset_pin: GPIO15
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 15
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,11 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO15
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 15
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,11 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_cap1188
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
reset_pin: GPIO6
|
||||
|
||||
cap1188:
|
||||
id: cap1188_component
|
||||
address: 0x29
|
||||
reset_pin: 6
|
||||
touch_threshold: 0x20
|
||||
allow_multiple_touches: true
|
||||
<<: !include common.yaml
|
||||
|
13
tests/components/ccs811/common.yaml
Normal file
13
tests/components/ccs811/common.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
@ -1,13 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
<<: !include common.yaml
|
||||
|
@ -1,13 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
<<: !include common.yaml
|
||||
|
@ -1,13 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
<<: !include common.yaml
|
||||
|
@ -1,13 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
<<: !include common.yaml
|
||||
|
@ -1,13 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
<<: !include common.yaml
|
||||
|
@ -1,13 +1,5 @@
|
||||
i2c:
|
||||
- id: i2c_ccs811
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
|
||||
sensor:
|
||||
- platform: ccs811
|
||||
eco2:
|
||||
name: CCS811 eCO2
|
||||
tvoc:
|
||||
name: CCS811 TVOC
|
||||
baseline: 0x4242
|
||||
update_interval: 30s
|
||||
<<: !include common.yaml
|
||||
|
18
tests/components/cd74hc4067/common.yaml
Normal file
18
tests/components/cd74hc4067/common.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
cd74hc4067:
|
||||
pin_s0: ${pin_s0}
|
||||
pin_s1: ${pin_s1}
|
||||
pin_s2: ${pin_s2}
|
||||
pin_s3: ${pin_s3}
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: ${pin}
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_0
|
||||
number: 0
|
||||
sensor: esp_adc_sensor
|
||||
- platform: cd74hc4067
|
||||
id: cd74hc4067_adc_1
|
||||
number: 1
|
||||
sensor: esp_adc_sensor
|
@ -1,18 +1,8 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 12
|
||||
pin_s1: 13
|
||||
pin_s2: 14
|
||||
pin_s3: 15
|
||||
substitutions:
|
||||
pin_s0: GPIO12
|
||||
pin_s1: GPIO13
|
||||
pin_s2: GPIO14
|
||||
pin_s3: GPIO15
|
||||
pin: GPIO39
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,18 +1,8 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 2
|
||||
pin_s1: 3
|
||||
pin_s2: 4
|
||||
pin_s3: 5
|
||||
substitutions:
|
||||
pin_s0: GPIO2
|
||||
pin_s1: GPIO3
|
||||
pin_s2: GPIO4
|
||||
pin_s3: GPIO5
|
||||
pin: GPIO0
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,18 +1,8 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 2
|
||||
pin_s1: 3
|
||||
pin_s2: 4
|
||||
pin_s3: 5
|
||||
substitutions:
|
||||
pin_s0: GPIO2
|
||||
pin_s1: GPIO3
|
||||
pin_s2: GPIO4
|
||||
pin_s3: GPIO5
|
||||
pin: GPIO0
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,18 +1,8 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 12
|
||||
pin_s1: 13
|
||||
pin_s2: 14
|
||||
pin_s3: 15
|
||||
substitutions:
|
||||
pin_s0: GPIO12
|
||||
pin_s1: GPIO13
|
||||
pin_s2: GPIO14
|
||||
pin_s3: GPIO15
|
||||
pin: GPIO39
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,18 +1,8 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 12
|
||||
pin_s1: 13
|
||||
pin_s2: 14
|
||||
pin_s3: 15
|
||||
substitutions:
|
||||
pin_s0: GPIO12
|
||||
pin_s1: GPIO13
|
||||
pin_s2: GPIO14
|
||||
pin_s3: GPIO15
|
||||
pin: A0
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,18 +1,8 @@
|
||||
cd74hc4067:
|
||||
pin_s0: 2
|
||||
pin_s1: 3
|
||||
pin_s2: 4
|
||||
pin_s3: 5
|
||||
substitutions:
|
||||
pin_s0: GPIO2
|
||||
pin_s1: GPIO3
|
||||
pin_s2: GPIO4
|
||||
pin_s3: GPIO5
|
||||
pin: GPIO26
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
7
tests/components/climate_ir_lg/common.yaml
Normal file
7
tests/components/climate_ir_lg/common.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: ${pin}
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 5
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO5
|
||||
|
||||
climate:
|
||||
- platform: climate_ir_lg
|
||||
name: LG Climate
|
||||
<<: !include common.yaml
|
||||
|
15
tests/components/color_temperature/common.yaml
Normal file
15
tests/components/color_temperature/common.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
output:
|
||||
- platform: ${light_platform}
|
||||
id: light_output_1
|
||||
pin: ${pin_o1}
|
||||
- platform: ${light_platform}
|
||||
id: light_output_2
|
||||
pin: ${pin_o2}
|
||||
|
||||
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
|
@ -1,15 +1,6 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO16
|
||||
pin_o2: GPIO17
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,15 +1,6 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 2
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO6
|
||||
pin_o2: GPIO7
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,15 +1,6 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 2
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO6
|
||||
pin_o2: GPIO7
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,15 +1,6 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO16
|
||||
pin_o2: GPIO17
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,15 +1,6 @@
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: esp8266_pwm
|
||||
pin_o1: GPIO12
|
||||
pin_o2: GPIO13
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
@ -1,15 +1,6 @@
|
||||
output:
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: rp2040_pwm
|
||||
pin_o1: GPIO12
|
||||
pin_o2: GPIO13
|
||||
|
||||
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
|
||||
<<: !include common.yaml
|
||||
|
7
tests/components/coolix/common.yaml
Normal file
7
tests/components/coolix/common.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
remote_transmitter:
|
||||
pin: ${pin}
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
climate:
|
||||
- platform: coolix
|
||||
name: Coolix Climate
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: coolix
|
||||
name: Coolix Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: coolix
|
||||
name: Coolix Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: coolix
|
||||
name: Coolix Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 2
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO2
|
||||
|
||||
climate:
|
||||
- platform: coolix
|
||||
name: Coolix Climate
|
||||
<<: !include common.yaml
|
||||
|
@ -1,7 +1,4 @@
|
||||
remote_transmitter:
|
||||
pin: 5
|
||||
carrier_duty_percent: 50%
|
||||
substitutions:
|
||||
pin: GPIO5
|
||||
|
||||
climate:
|
||||
- platform: coolix
|
||||
name: Coolix Climate
|
||||
<<: !include common.yaml
|
||||
|
23
tests/components/copy/common.yaml
Normal file
23
tests/components/copy/common.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
output:
|
||||
- platform: ${pwm_platform}
|
||||
id: fan_output_1
|
||||
pin: ${pin}
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
@ -1,23 +1,5 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: fan_output_1
|
||||
pin: 12
|
||||
substitutions:
|
||||
pwm_platform: ledc
|
||||
pin: GPIO12
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
||||
<<: !include common.yaml
|
||||
|
@ -1,23 +1,5 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: fan_output_1
|
||||
pin: 2
|
||||
substitutions:
|
||||
pwm_platform: ledc
|
||||
pin: GPIO2
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
||||
<<: !include common.yaml
|
||||
|
@ -1,23 +1,5 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: fan_output_1
|
||||
pin: 2
|
||||
substitutions:
|
||||
pwm_platform: ledc
|
||||
pin: GPIO2
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
||||
<<: !include common.yaml
|
||||
|
@ -1,23 +1,5 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: fan_output_1
|
||||
pin: 12
|
||||
substitutions:
|
||||
pwm_platform: ledc
|
||||
pin: GPIO12
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
||||
<<: !include common.yaml
|
||||
|
@ -1,23 +1,5 @@
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: fan_output_1
|
||||
pin: 12
|
||||
substitutions:
|
||||
pwm_platform: esp8266_pwm
|
||||
pin: GPIO12
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
||||
<<: !include common.yaml
|
||||
|
@ -1,23 +1,5 @@
|
||||
output:
|
||||
- platform: rp2040_pwm
|
||||
id: fan_output_1
|
||||
pin: 12
|
||||
substitutions:
|
||||
pwm_platform: rp2040_pwm
|
||||
pin: GPIO12
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
id: fan_speed
|
||||
output: fan_output_1
|
||||
- platform: copy
|
||||
source_id: fan_speed
|
||||
name: Fan Speed Copy
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: test_select
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
optimistic: true
|
||||
- platform: copy
|
||||
source_id: test_select
|
||||
name: Test Select Copy
|
||||
<<: !include common.yaml
|
||||
|
27
tests/components/cs5460a/common.yaml
Normal file
27
tests/components/cs5460a/common.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: ${clk_pin}
|
||||
mosi_pin: ${mosi_pin}
|
||||
miso_pin: ${miso_pin}
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: ${cs_pin}
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
substitutions:
|
||||
clk_pin: GPIO16
|
||||
mosi_pin: GPIO17
|
||||
miso_pin: GPIO15
|
||||
cs_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 12
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO5
|
||||
cs_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 8
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO5
|
||||
cs_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 8
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
substitutions:
|
||||
clk_pin: GPIO16
|
||||
mosi_pin: GPIO17
|
||||
miso_pin: GPIO15
|
||||
cs_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 12
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
substitutions:
|
||||
clk_pin: GPIO14
|
||||
mosi_pin: GPIO13
|
||||
miso_pin: GPIO12
|
||||
cs_pin: GPIO15
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 15
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
@ -1,27 +1,7 @@
|
||||
spi:
|
||||
- id: spi_cs5460a
|
||||
clk_pin: 2
|
||||
mosi_pin: 3
|
||||
miso_pin: 4
|
||||
substitutions:
|
||||
clk_pin: GPIO2
|
||||
mosi_pin: GPIO3
|
||||
miso_pin: GPIO4
|
||||
cs_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cs5460a
|
||||
id: cs5460a1
|
||||
cs_pin: 6
|
||||
current:
|
||||
name: Socket current
|
||||
voltage:
|
||||
name: Mains voltage
|
||||
power:
|
||||
name: Socket power
|
||||
on_value:
|
||||
then:
|
||||
cs5460a.restart: cs5460a1
|
||||
samples: 1600
|
||||
pga_gain: 10X
|
||||
current_gain: 0.01
|
||||
voltage_gain: 0.000573
|
||||
current_hpf: true
|
||||
voltage_hpf: true
|
||||
phase_offset: 20
|
||||
pulse_energy: 0.01 kWh
|
||||
<<: !include common.yaml
|
||||
|
18
tests/components/cse7761/common.yaml
Normal file
18
tests/components/cse7761/common.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
baud_rate: 38400
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
@ -1,20 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 38400
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
||||
<<: !include common.yaml
|
||||
|
@ -1,20 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 38400
|
||||
substitutions:
|
||||
tx_pin: GPIO7
|
||||
rx_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
||||
<<: !include common.yaml
|
||||
|
@ -1,20 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 38400
|
||||
substitutions:
|
||||
tx_pin: GPIO7
|
||||
rx_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
||||
<<: !include common.yaml
|
||||
|
@ -1,20 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 38400
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
||||
<<: !include common.yaml
|
||||
|
@ -1,20 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 38400
|
||||
substitutions:
|
||||
tx_pin: GPIO1
|
||||
rx_pin: GPIO3
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
||||
<<: !include common.yaml
|
||||
|
@ -1,20 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7761
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 38400
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cse7761
|
||||
voltage:
|
||||
name: CSE7761 Voltage
|
||||
current_1:
|
||||
name: CSE7761 Current 1
|
||||
current_2:
|
||||
name: CSE7761 Current 2
|
||||
active_power_1:
|
||||
name: CSE7761 Active Power 1
|
||||
active_power_2:
|
||||
name: CSE7761 Active Power 2
|
||||
<<: !include common.yaml
|
||||
|
15
tests/components/cse7766/common.yaml
Normal file
15
tests/components/cse7766/common.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
@ -1,17 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
||||
<<: !include common.yaml
|
||||
|
@ -1,17 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO7
|
||||
rx_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
||||
<<: !include common.yaml
|
||||
|
@ -1,17 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO7
|
||||
rx_pin: GPIO8
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
||||
<<: !include common.yaml
|
||||
|
@ -1,17 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin:
|
||||
number: 17
|
||||
rx_pin:
|
||||
number: 16
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO12
|
||||
rx_pin: GPIO14
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
||||
<<: !include common.yaml
|
||||
|
@ -1,17 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO1
|
||||
rx_pin: GPIO3
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
||||
<<: !include common.yaml
|
||||
|
@ -1,17 +1,5 @@
|
||||
uart:
|
||||
- id: uart_cse7766
|
||||
tx_pin:
|
||||
number: 4
|
||||
rx_pin:
|
||||
number: 5
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
voltage:
|
||||
name: CSE7766 Voltage
|
||||
current:
|
||||
name: CSE7766 Current
|
||||
power:
|
||||
name: CSE776 Power
|
||||
<<: !include common.yaml
|
||||
|
@ -1,25 +1,25 @@
|
||||
i2c:
|
||||
- id: i2c_cst226
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
spi:
|
||||
- id: spi_id_1
|
||||
clk_pin: GPIO7
|
||||
mosi_pin: GPIO6
|
||||
interface: any
|
||||
- id: spi_ili9xxx
|
||||
clk_pin: ${clk_pin}
|
||||
mosi_pin: ${mosi_pin}
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: displ8
|
||||
- id: my_display
|
||||
platform: ili9xxx
|
||||
model: ili9342
|
||||
cs_pin: GPIO5
|
||||
dc_pin: GPIO4
|
||||
reset_pin:
|
||||
number: GPIO21
|
||||
cs_pin: ${cs_pin}
|
||||
dc_pin: ${dc_pin}
|
||||
reset_pin: ${disp_reset_pin}
|
||||
invert_colors: false
|
||||
|
||||
i2c:
|
||||
scl: GPIO18
|
||||
sda: GPIO8
|
||||
|
||||
touchscreen:
|
||||
- platform: cst226
|
||||
interrupt_pin: GPIO3
|
||||
reset_pin: GPIO20
|
||||
- id: ts_cst226
|
||||
platform: cst226
|
||||
interrupt_pin: ${interrupt_pin}
|
||||
reset_pin: ${reset_pin}
|
||||
|
||||
|
12
tests/components/cst226/test.esp32-ard.yaml
Normal file
12
tests/components/cst226/test.esp32-ard.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO0
|
||||
mosi_pin: GPIO2
|
||||
cs_pin: GPIO4
|
||||
dc_pin: GPIO5
|
||||
disp_reset_pin: GPIO12
|
||||
scl_pin: GPIO13
|
||||
sda_pin: GPIO14
|
||||
interrupt_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
@ -1 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
cs_pin: GPIO8
|
||||
dc_pin: GPIO9
|
||||
disp_reset_pin: GPIO10
|
||||
scl_pin: GPIO0
|
||||
sda_pin: GPIO1
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
|
||||
<<: !include common.yaml
|
||||
|
12
tests/components/cst226/test.esp32-c3-idf.yaml
Normal file
12
tests/components/cst226/test.esp32-c3-idf.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
cs_pin: GPIO8
|
||||
dc_pin: GPIO9
|
||||
disp_reset_pin: GPIO10
|
||||
scl_pin: GPIO0
|
||||
sda_pin: GPIO1
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
|
||||
<<: !include common.yaml
|
12
tests/components/cst226/test.esp32-idf.yaml
Normal file
12
tests/components/cst226/test.esp32-idf.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO0
|
||||
mosi_pin: GPIO2
|
||||
cs_pin: GPIO4
|
||||
dc_pin: GPIO5
|
||||
disp_reset_pin: GPIO12
|
||||
scl_pin: GPIO13
|
||||
sda_pin: GPIO14
|
||||
interrupt_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
@ -1,27 +1,21 @@
|
||||
touchscreen:
|
||||
- platform: cst816
|
||||
id: my_touchscreen
|
||||
interrupt_pin:
|
||||
number: 21
|
||||
reset_pin: GPIO16
|
||||
skip_probe: false
|
||||
transform:
|
||||
mirror_x: false
|
||||
mirror_y: false
|
||||
swap_xy: false
|
||||
|
||||
i2c:
|
||||
sda: 3
|
||||
scl: 4
|
||||
- id: i2c_cst816
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
spi:
|
||||
- id: spi_ili9xxx
|
||||
clk_pin: ${clk_pin}
|
||||
mosi_pin: ${mosi_pin}
|
||||
|
||||
display:
|
||||
- id: my_display
|
||||
platform: ili9xxx
|
||||
dimensions: 480x320
|
||||
model: ST7796
|
||||
cs_pin: 18
|
||||
dc_pin: 20
|
||||
reset_pin: 22
|
||||
cs_pin: ${cs_pin}
|
||||
dc_pin: ${dc_pin}
|
||||
reset_pin: ${disp_reset_pin}
|
||||
transform:
|
||||
swap_xy: true
|
||||
mirror_x: true
|
||||
@ -29,9 +23,16 @@ display:
|
||||
auto_clear_enabled: false
|
||||
invert_colors: false
|
||||
|
||||
spi:
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
touchscreen:
|
||||
- id: ts_cst816
|
||||
platform: cst816
|
||||
interrupt_pin: ${interrupt_pin}
|
||||
reset_pin: ${reset_pin}
|
||||
skip_probe: false
|
||||
transform:
|
||||
mirror_x: false
|
||||
mirror_y: false
|
||||
swap_xy: false
|
||||
|
||||
binary_sensor:
|
||||
- platform: cst816
|
||||
|
@ -1 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO0
|
||||
mosi_pin: GPIO2
|
||||
cs_pin: GPIO4
|
||||
dc_pin: GPIO5
|
||||
disp_reset_pin: GPIO12
|
||||
scl_pin: GPIO13
|
||||
sda_pin: GPIO14
|
||||
interrupt_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
||||
|
12
tests/components/cst816/test.esp32-c3-ard.yaml
Normal file
12
tests/components/cst816/test.esp32-c3-ard.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
cs_pin: GPIO8
|
||||
dc_pin: GPIO9
|
||||
disp_reset_pin: GPIO10
|
||||
scl_pin: GPIO0
|
||||
sda_pin: GPIO1
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
|
||||
<<: !include common.yaml
|
12
tests/components/cst816/test.esp32-c3-idf.yaml
Normal file
12
tests/components/cst816/test.esp32-c3-idf.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
cs_pin: GPIO8
|
||||
dc_pin: GPIO9
|
||||
disp_reset_pin: GPIO10
|
||||
scl_pin: GPIO0
|
||||
sda_pin: GPIO1
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
|
||||
<<: !include common.yaml
|
12
tests/components/cst816/test.esp32-idf.yaml
Normal file
12
tests/components/cst816/test.esp32-idf.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO0
|
||||
mosi_pin: GPIO2
|
||||
cs_pin: GPIO4
|
||||
dc_pin: GPIO5
|
||||
disp_reset_pin: GPIO12
|
||||
scl_pin: GPIO13
|
||||
sda_pin: GPIO14
|
||||
interrupt_pin: GPIO15
|
||||
reset_pin: GPIO16
|
||||
|
||||
<<: !include common.yaml
|
9
tests/components/ct_clamp/common.yaml
Normal file
9
tests/components/ct_clamp/common.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: ${pin}
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
@ -1,9 +1,4 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 39
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
substitutions:
|
||||
pin: GPIO39
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@ -1,9 +1,4 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 0
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
substitutions:
|
||||
pin: GPIO0
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@ -1,9 +1,4 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 0
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
substitutions:
|
||||
pin: GPIO0
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@ -1,9 +1,4 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 39
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
substitutions:
|
||||
pin: GPIO39
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@ -1,9 +1,4 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: A0
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
substitutions:
|
||||
pin: A0
|
||||
|
||||
<<: !include common.yaml
|
||||
|
@ -1,9 +1,4 @@
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: esp_adc_sensor
|
||||
pin: 26
|
||||
- platform: ct_clamp
|
||||
sensor: esp_adc_sensor
|
||||
name: CT Clamp
|
||||
sample_duration: 500ms
|
||||
update_interval: 5s
|
||||
substitutions:
|
||||
pin: GPIO26
|
||||
|
||||
<<: !include common.yaml
|
||||
|
68
tests/components/current_based/common.yaml
Normal file
68
tests/components/current_based/common.yaml
Normal file
@ -0,0 +1,68 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: ${scl_pin}
|
||||
sda: ${sda_pin}
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: ${irq_pin}
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
@ -1,68 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
irq_pin: GPIO15
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 15
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
<<: !include common.yaml
|
||||
|
@ -1,68 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq_pin: GPIO6
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 6
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
<<: !include common.yaml
|
||||
|
@ -1,68 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq_pin: GPIO6
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 6
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
<<: !include common.yaml
|
||||
|
@ -1,68 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 16
|
||||
sda: 17
|
||||
substitutions:
|
||||
scl_pin: GPIO16
|
||||
sda_pin: GPIO17
|
||||
irq_pin: GPIO15
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 15
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
<<: !include common.yaml
|
||||
|
@ -1,68 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq_pin: GPIO15
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 15
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
<<: !include common.yaml
|
||||
|
@ -1,68 +1,6 @@
|
||||
i2c:
|
||||
- id: i2c_ade7953
|
||||
scl: 5
|
||||
sda: 4
|
||||
substitutions:
|
||||
scl_pin: GPIO5
|
||||
sda_pin: GPIO4
|
||||
irq_pin: GPIO6
|
||||
|
||||
sensor:
|
||||
- platform: ade7953_i2c
|
||||
irq_pin: 6
|
||||
voltage:
|
||||
name: ADE7953 Voltage
|
||||
id: ade7953_voltage
|
||||
current_a:
|
||||
name: ADE7953 Current A
|
||||
id: ade7953_current_a
|
||||
current_b:
|
||||
name: ADE7953 Current B
|
||||
id: ade7953_current_b
|
||||
power_factor_a:
|
||||
name: ADE7953 Power Factor A
|
||||
power_factor_b:
|
||||
name: ADE7953 Power Factor B
|
||||
apparent_power_a:
|
||||
name: ADE7953 Apparent Power A
|
||||
apparent_power_b:
|
||||
name: ADE7953 Apparent Power B
|
||||
active_power_a:
|
||||
name: ADE7953 Active Power A
|
||||
active_power_b:
|
||||
name: ADE7953 Active Power B
|
||||
reactive_power_a:
|
||||
name: ADE7953 Reactive Power A
|
||||
reactive_power_b:
|
||||
name: ADE7953 Reactive Power B
|
||||
update_interval: 1s
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
id: template_switch1
|
||||
optimistic: true
|
||||
- platform: template
|
||||
id: template_switch2
|
||||
optimistic: true
|
||||
|
||||
cover:
|
||||
- platform: current_based
|
||||
name: Current Based Cover
|
||||
id: current_based_cover
|
||||
open_sensor: ade7953_current_a
|
||||
open_moving_current_threshold: 0.5
|
||||
open_obstacle_current_threshold: 0.8
|
||||
open_duration: 12s
|
||||
open_action:
|
||||
- switch.turn_on: template_switch1
|
||||
close_sensor: ade7953_current_b
|
||||
close_moving_current_threshold: 0.5
|
||||
close_obstacle_current_threshold: 0.8
|
||||
close_duration: 10s
|
||||
close_action:
|
||||
- switch.turn_on: template_switch2
|
||||
stop_action:
|
||||
- switch.turn_off: template_switch1
|
||||
- switch.turn_off: template_switch2
|
||||
obstacle_rollback: 30%
|
||||
start_sensing_delay: 0.8s
|
||||
malfunction_detection: true
|
||||
malfunction_action:
|
||||
then:
|
||||
- logger.log: Malfunction Detected
|
||||
<<: !include common.yaml
|
||||
|
16
tests/components/cwww/common.yaml
Normal file
16
tests/components/cwww/common.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
output:
|
||||
- platform: ${light_platform}
|
||||
id: light_output_1
|
||||
pin: ${pin_o1}
|
||||
- platform: ${light_platform}
|
||||
id: light_output_2
|
||||
pin: ${pin_o2}
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
@ -1,16 +1,6 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO16
|
||||
pin_o2: GPIO17
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,16 +1,6 @@
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 2
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO6
|
||||
pin_o2: GPIO7
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,19 +1,14 @@
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO6
|
||||
pin_o2: GPIO7
|
||||
|
||||
packages:
|
||||
device_base: !include common.yaml
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 1
|
||||
- id: !extend light_output_1
|
||||
channel: 0
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 2
|
||||
- id: !extend light_output_2
|
||||
channel: 1
|
||||
phase_angle: 180°
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
||||
|
@ -1,19 +1,14 @@
|
||||
substitutions:
|
||||
light_platform: ledc
|
||||
pin_o1: GPIO16
|
||||
pin_o2: GPIO17
|
||||
|
||||
packages:
|
||||
device_base: !include common.yaml
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- id: !extend light_output_1
|
||||
channel: 0
|
||||
- platform: ledc
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
- id: !extend light_output_2
|
||||
channel: 1
|
||||
phase_angle: 180°
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
||||
|
@ -1,16 +1,6 @@
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: esp8266_pwm
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: esp8266_pwm
|
||||
pin_o1: GPIO12
|
||||
pin_o2: GPIO13
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
||||
<<: !include common.yaml
|
||||
|
@ -1,16 +1,6 @@
|
||||
output:
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_1
|
||||
pin: 12
|
||||
- platform: rp2040_pwm
|
||||
id: light_output_2
|
||||
pin: 13
|
||||
substitutions:
|
||||
light_platform: rp2040_pwm
|
||||
pin_o1: GPIO12
|
||||
pin_o2: GPIO13
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: CWWW Light
|
||||
cold_white: light_output_1
|
||||
warm_white: light_output_2
|
||||
cold_white_color_temperature: 153 mireds
|
||||
warm_white_color_temperature: 500 mireds
|
||||
constant_brightness: true
|
||||
<<: !include common.yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user