mirror of
https://github.com/esphome/esphome.git
synced 2025-02-14 17:08:22 +00:00
[CI] Consolidate some tests (A) (#8184)
This commit is contained in:
parent
6f4e8f1fbf
commit
d4ac2d3c7e
11
tests/components/a02yyuw/common.yaml
Normal file
11
tests/components/a02yyuw/common.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
uart:
|
||||||
|
- id: uart_a02yyuw
|
||||||
|
tx_pin: ${tx_pin}
|
||||||
|
rx_pin: ${rx_pin}
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: a02yyuw
|
||||||
|
id: a02yyuw_sensor
|
||||||
|
name: a02yyuw Distance
|
||||||
|
uart_id: uart_a02yyuw
|
@ -1,13 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_a02yyuw
|
tx_pin: GPIO17
|
||||||
tx_pin:
|
rx_pin: GPIO16
|
||||||
number: 17
|
|
||||||
rx_pin:
|
|
||||||
number: 16
|
|
||||||
baud_rate: 9600
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: a02yyuw
|
|
||||||
id: a02yyuw_sensor
|
|
||||||
name: a02yyuw Distance
|
|
||||||
uart_id: uart_a02yyuw
|
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_a02yyuw
|
tx_pin: GPIO4
|
||||||
tx_pin:
|
rx_pin: GPIO5
|
||||||
number: 4
|
|
||||||
rx_pin:
|
|
||||||
number: 5
|
|
||||||
baud_rate: 9600
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: a02yyuw
|
|
||||||
id: a02yyuw_sensor
|
|
||||||
name: a02yyuw Distance
|
|
||||||
uart_id: uart_a02yyuw
|
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_a02yyuw
|
tx_pin: GPIO4
|
||||||
tx_pin:
|
rx_pin: GPIO5
|
||||||
number: 4
|
|
||||||
rx_pin:
|
|
||||||
number: 5
|
|
||||||
baud_rate: 9600
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: a02yyuw
|
|
||||||
id: a02yyuw_sensor
|
|
||||||
name: a02yyuw Distance
|
|
||||||
uart_id: uart_a02yyuw
|
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_a02yyuw
|
tx_pin: GPIO17
|
||||||
tx_pin:
|
rx_pin: GPIO16
|
||||||
number: 17
|
|
||||||
rx_pin:
|
|
||||||
number: 16
|
|
||||||
baud_rate: 9600
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: a02yyuw
|
|
||||||
id: a02yyuw_sensor
|
|
||||||
name: a02yyuw Distance
|
|
||||||
uart_id: uart_a02yyuw
|
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_a02yyuw
|
tx_pin: GPIO4
|
||||||
tx_pin:
|
rx_pin: GPIO5
|
||||||
number: 4
|
|
||||||
rx_pin:
|
|
||||||
number: 5
|
|
||||||
baud_rate: 9600
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: a02yyuw
|
|
||||||
id: a02yyuw_sensor
|
|
||||||
name: a02yyuw Distance
|
|
||||||
uart_id: uart_a02yyuw
|
|
||||||
|
@ -1,13 +1,5 @@
|
|||||||
uart:
|
substitutions:
|
||||||
- id: uart_a02yyuw
|
tx_pin: GPIO4
|
||||||
tx_pin:
|
rx_pin: GPIO5
|
||||||
number: 4
|
|
||||||
rx_pin:
|
|
||||||
number: 5
|
|
||||||
baud_rate: 9600
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: a02yyuw
|
|
||||||
id: a02yyuw_sensor
|
|
||||||
name: a02yyuw Distance
|
|
||||||
uart_id: uart_a02yyuw
|
|
||||||
|
9
tests/components/a4988/common.yaml
Normal file
9
tests/components/a4988/common.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
stepper:
|
||||||
|
- platform: a4988
|
||||||
|
id: a4988_stepper
|
||||||
|
step_pin: ${step_pin}
|
||||||
|
dir_pin: ${dir_pin}
|
||||||
|
sleep_pin: ${sleep_pin}
|
||||||
|
max_speed: 250 steps/s
|
||||||
|
acceleration: 100 steps/s^2
|
||||||
|
deceleration: 200 steps/s^2
|
@ -1,12 +1,6 @@
|
|||||||
stepper:
|
substitutions:
|
||||||
- platform: a4988
|
step_pin: GPIO22
|
||||||
id: a4988_stepper
|
dir_pin: GPIO23
|
||||||
step_pin:
|
sleep_pin: GPIO25
|
||||||
number: 22
|
|
||||||
dir_pin:
|
<<: !include common.yaml
|
||||||
number: 23
|
|
||||||
sleep_pin:
|
|
||||||
number: 25
|
|
||||||
max_speed: 250 steps/s
|
|
||||||
acceleration: 100 steps/s^2
|
|
||||||
deceleration: 200 steps/s^2
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
stepper:
|
substitutions:
|
||||||
- platform: a4988
|
step_pin: GPIO2
|
||||||
id: a4988_stepper
|
dir_pin: GPIO3
|
||||||
step_pin:
|
sleep_pin: GPIO5
|
||||||
number: 2
|
|
||||||
dir_pin:
|
<<: !include common.yaml
|
||||||
number: 3
|
|
||||||
sleep_pin:
|
|
||||||
number: 5
|
|
||||||
max_speed: 250 steps/s
|
|
||||||
acceleration: 100 steps/s^2
|
|
||||||
deceleration: 200 steps/s^2
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
stepper:
|
substitutions:
|
||||||
- platform: a4988
|
step_pin: GPIO2
|
||||||
id: a4988_stepper
|
dir_pin: GPIO3
|
||||||
step_pin:
|
sleep_pin: GPIO5
|
||||||
number: 2
|
|
||||||
dir_pin:
|
<<: !include common.yaml
|
||||||
number: 3
|
|
||||||
sleep_pin:
|
|
||||||
number: 5
|
|
||||||
max_speed: 250 steps/s
|
|
||||||
acceleration: 100 steps/s^2
|
|
||||||
deceleration: 200 steps/s^2
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
stepper:
|
substitutions:
|
||||||
- platform: a4988
|
step_pin: GPIO22
|
||||||
id: a4988_stepper
|
dir_pin: GPIO23
|
||||||
step_pin:
|
sleep_pin: GPIO25
|
||||||
number: 22
|
|
||||||
dir_pin:
|
<<: !include common.yaml
|
||||||
number: 23
|
|
||||||
sleep_pin:
|
|
||||||
number: 25
|
|
||||||
max_speed: 250 steps/s
|
|
||||||
acceleration: 100 steps/s^2
|
|
||||||
deceleration: 200 steps/s^2
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
stepper:
|
substitutions:
|
||||||
- platform: a4988
|
step_pin: GPIO1
|
||||||
id: a4988_stepper
|
dir_pin: GPIO2
|
||||||
step_pin:
|
sleep_pin: GPIO5
|
||||||
number: 1
|
|
||||||
dir_pin:
|
<<: !include common.yaml
|
||||||
number: 2
|
|
||||||
sleep_pin:
|
|
||||||
number: 5
|
|
||||||
max_speed: 250 steps/s
|
|
||||||
acceleration: 100 steps/s^2
|
|
||||||
deceleration: 200 steps/s^2
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
stepper:
|
substitutions:
|
||||||
- platform: a4988
|
step_pin: GPIO2
|
||||||
id: a4988_stepper
|
dir_pin: GPIO3
|
||||||
step_pin:
|
sleep_pin: GPIO5
|
||||||
number: 2
|
|
||||||
dir_pin:
|
<<: !include common.yaml
|
||||||
number: 3
|
|
||||||
sleep_pin:
|
|
||||||
number: 5
|
|
||||||
max_speed: 250 steps/s
|
|
||||||
acceleration: 100 steps/s^2
|
|
||||||
deceleration: 200 steps/s^2
|
|
||||||
|
5
tests/components/ac_dimmer/common.yaml
Normal file
5
tests/components/ac_dimmer/common.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
output:
|
||||||
|
- platform: ac_dimmer
|
||||||
|
id: ac_dimmer_1
|
||||||
|
gate_pin: ${gate_pin}
|
||||||
|
zero_cross_pin: ${zero_cross_pin}
|
@ -1,7 +1,5 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ac_dimmer
|
gate_pin: GPIO18
|
||||||
id: ac_dimmer_1
|
zero_cross_pin: GPIO19
|
||||||
gate_pin:
|
|
||||||
number: 12
|
<<: !include common.yaml
|
||||||
zero_cross_pin:
|
|
||||||
number: 13
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ac_dimmer
|
gate_pin: GPIO5
|
||||||
id: ac_dimmer_1
|
zero_cross_pin: GPIO4
|
||||||
gate_pin:
|
|
||||||
number: 5
|
<<: !include common.yaml
|
||||||
zero_cross_pin:
|
|
||||||
number: 6
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ac_dimmer
|
gate_pin: GPIO5
|
||||||
id: ac_dimmer_1
|
zero_cross_pin: GPIO4
|
||||||
gate_pin:
|
|
||||||
number: 5
|
<<: !include common.yaml
|
||||||
zero_cross_pin:
|
|
||||||
number: 4
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
output:
|
substitutions:
|
||||||
- platform: ac_dimmer
|
gate_pin: GPIO5
|
||||||
id: ac_dimmer_1
|
zero_cross_pin: GPIO4
|
||||||
gate_pin:
|
|
||||||
number: 5
|
<<: !include common.yaml
|
||||||
zero_cross_pin:
|
|
||||||
number: 6
|
|
||||||
|
@ -2,4 +2,4 @@ sensor:
|
|||||||
- platform: adc
|
- platform: adc
|
||||||
id: my_sensor
|
id: my_sensor
|
||||||
pin: 4
|
pin: 4
|
||||||
attenuation: 11db
|
attenuation: 12db
|
||||||
|
@ -2,4 +2,4 @@ sensor:
|
|||||||
- platform: adc
|
- platform: adc
|
||||||
id: my_sensor
|
id: my_sensor
|
||||||
pin: 1
|
pin: 1
|
||||||
attenuation: 11db
|
attenuation: 12db
|
||||||
|
@ -2,4 +2,4 @@ sensor:
|
|||||||
- platform: adc
|
- platform: adc
|
||||||
id: my_sensor
|
id: my_sensor
|
||||||
pin: 1
|
pin: 1
|
||||||
attenuation: 11db
|
attenuation: 12db
|
||||||
|
14
tests/components/adc128s102/common.yaml
Normal file
14
tests/components/adc128s102/common.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_adc128s102
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
adc128s102:
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
id: adc128s102_adc
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: adc128s102
|
||||||
|
id: adc128s102_channel_0
|
||||||
|
channel: 0
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_adc128s102
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO12
|
||||||
|
|
||||||
adc128s102:
|
<<: !include common.yaml
|
||||||
cs_pin: 12
|
|
||||||
id: adc128s102_adc
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: adc128s102
|
|
||||||
id: adc128s102_channel_0
|
|
||||||
channel: 0
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_adc128s102
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO2
|
||||||
|
|
||||||
adc128s102:
|
<<: !include common.yaml
|
||||||
cs_pin: 8
|
|
||||||
id: adc128s102_adc
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: adc128s102
|
|
||||||
id: adc128s102_channel_0
|
|
||||||
channel: 0
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_adc128s102
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO2
|
||||||
|
|
||||||
adc128s102:
|
<<: !include common.yaml
|
||||||
cs_pin: 8
|
|
||||||
id: adc128s102_adc
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: adc128s102
|
|
||||||
id: adc128s102_channel_0
|
|
||||||
channel: 0
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_adc128s102
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO12
|
||||||
|
|
||||||
adc128s102:
|
<<: !include common.yaml
|
||||||
cs_pin: 12
|
|
||||||
id: adc128s102_adc
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: adc128s102
|
|
||||||
id: adc128s102_channel_0
|
|
||||||
channel: 0
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_adc128s102
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
adc128s102:
|
<<: !include common.yaml
|
||||||
cs_pin: 15
|
|
||||||
id: adc128s102_adc
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: adc128s102
|
|
||||||
id: adc128s102_channel_0
|
|
||||||
channel: 0
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_adc128s102
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
adc128s102:
|
<<: !include common.yaml
|
||||||
cs_pin: 5
|
|
||||||
id: adc128s102_adc
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: adc128s102
|
|
||||||
id: adc128s102_channel_0
|
|
||||||
channel: 0
|
|
||||||
|
@ -5,7 +5,7 @@ light:
|
|||||||
chipset: ws2812
|
chipset: ws2812
|
||||||
rgb_order: GRB
|
rgb_order: GRB
|
||||||
num_leds: 256
|
num_leds: 256
|
||||||
pin: 2
|
pin: ${pin}
|
||||||
rmt_channel: 0
|
rmt_channel: 0
|
||||||
|
|
||||||
display:
|
display:
|
@ -3,7 +3,7 @@ light:
|
|||||||
id: led_matrix_32x8
|
id: led_matrix_32x8
|
||||||
name: led_matrix_32x8
|
name: led_matrix_32x8
|
||||||
chipset: WS2812B
|
chipset: WS2812B
|
||||||
pin: 2
|
pin: ${pin}
|
||||||
num_leds: 256
|
num_leds: 256
|
||||||
rgb_order: GRB
|
rgb_order: GRB
|
||||||
default_transition_length: 0s
|
default_transition_length: 0s
|
@ -5,7 +5,7 @@ light:
|
|||||||
chipset: ws2812
|
chipset: ws2812
|
||||||
rgb_order: GRB
|
rgb_order: GRB
|
||||||
num_leds: 256
|
num_leds: 256
|
||||||
pin: 2
|
pin: ${pin}
|
||||||
|
|
||||||
display:
|
display:
|
||||||
- platform: addressable_light
|
- platform: addressable_light
|
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO2
|
||||||
|
|
||||||
|
<<: !include common-ard-esp32_rmt_led_strip.yaml
|
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO2
|
||||||
|
|
||||||
|
<<: !include common-ard-esp32_rmt_led_strip.yaml
|
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO2
|
||||||
|
|
||||||
|
<<: !include common-idf-esp32_rmt_led_strip.yaml
|
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO2
|
||||||
|
|
||||||
|
<<: !include common-idf-esp32_rmt_led_strip.yaml
|
@ -0,0 +1,4 @@
|
|||||||
|
substitutions:
|
||||||
|
pin: GPIO2
|
||||||
|
|
||||||
|
<<: !include common-ard-fastled.yaml
|
@ -1,30 +0,0 @@
|
|||||||
light:
|
|
||||||
- platform: esp32_rmt_led_strip
|
|
||||||
id: led_matrix_32x8
|
|
||||||
default_transition_length: 500ms
|
|
||||||
chipset: ws2812
|
|
||||||
rgb_order: GRB
|
|
||||||
num_leds: 256
|
|
||||||
pin: 2
|
|
||||||
|
|
||||||
display:
|
|
||||||
- platform: addressable_light
|
|
||||||
id: led_matrix_32x8_display
|
|
||||||
addressable_light_id: led_matrix_32x8
|
|
||||||
width: 32
|
|
||||||
height: 8
|
|
||||||
pixel_mapper: |-
|
|
||||||
if (x % 2 == 0) {
|
|
||||||
return (x * 8) + y;
|
|
||||||
}
|
|
||||||
return (x * 8) + (7 - y);
|
|
||||||
lambda: |-
|
|
||||||
Color red = Color(0xFF0000);
|
|
||||||
Color green = Color(0x00FF00);
|
|
||||||
Color blue = Color(0x0000FF);
|
|
||||||
it.rectangle(0, 0, it.get_width(), it.get_height(), red);
|
|
||||||
it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green);
|
|
||||||
it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue);
|
|
||||||
it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red);
|
|
||||||
rotation: 0°
|
|
||||||
update_interval: 16ms
|
|
34
tests/components/ade7953_i2c/common.yaml
Normal file
34
tests/components/ade7953_i2c/common.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
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
|
@ -1,34 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ade7953
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
irq_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- 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
|
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ade7953
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO6
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- 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
|
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ade7953
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO6
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- 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
|
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ade7953
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
irq_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- 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
|
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ade7953
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- 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
|
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ade7953
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO6
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- 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
|
|
||||||
|
36
tests/components/ade7953_spi/common.yaml
Normal file
36
tests/components/ade7953_spi/common.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_ade7953
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: ade7953_spi
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
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
|
@ -1,36 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_ade7953
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
irq_pin: GPIO13
|
||||||
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ade7953_spi
|
|
||||||
cs_pin: 5
|
|
||||||
irq_pin: 13
|
|
||||||
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
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_ade7953
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
irq_pin: GPIO9
|
||||||
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ade7953_spi
|
|
||||||
cs_pin: 8
|
|
||||||
irq_pin: 9
|
|
||||||
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
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_ade7953
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
irq_pin: GPIO9
|
||||||
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ade7953_spi
|
|
||||||
cs_pin: 8
|
|
||||||
irq_pin: 9
|
|
||||||
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
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_ade7953
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
irq_pin: GPIO13
|
||||||
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ade7953_spi
|
|
||||||
cs_pin: 5
|
|
||||||
irq_pin: 13
|
|
||||||
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
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_ade7953
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
irq_pin: GPIO5
|
||||||
|
cs_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ade7953_spi
|
|
||||||
cs_pin: 15
|
|
||||||
irq_pin: 5
|
|
||||||
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
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_ade7953
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
irq_pin: GPIO5
|
||||||
|
cs_pin: GPIO6
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ade7953_spi
|
|
||||||
cs_pin: 5
|
|
||||||
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
|
|
||||||
|
14
tests/components/ads1115/common.yaml
Normal file
14
tests/components/ads1115/common.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_ads1115
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
ads1115:
|
||||||
|
address: 0x48
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: ads1115
|
||||||
|
multiplexer: A0_A1
|
||||||
|
gain: 1.024
|
||||||
|
sample_rate: 128
|
||||||
|
id: ads1115_sensor
|
@ -1,14 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ads1115
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
ads1115:
|
<<: !include common.yaml
|
||||||
address: 0x48
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: ads1115
|
|
||||||
multiplexer: A0_A1
|
|
||||||
gain: 1.024
|
|
||||||
sample_rate: 128
|
|
||||||
id: ads1115_sensor
|
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ads1115
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
ads1115:
|
<<: !include common.yaml
|
||||||
address: 0x48
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: ads1115
|
|
||||||
multiplexer: A0_A1
|
|
||||||
gain: 1.024
|
|
||||||
sample_rate: 128
|
|
||||||
id: ads1115_sensor
|
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ads1115
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
ads1115:
|
<<: !include common.yaml
|
||||||
address: 0x48
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: ads1115
|
|
||||||
multiplexer: A0_A1
|
|
||||||
gain: 1.024
|
|
||||||
sample_rate: 128
|
|
||||||
id: ads1115_sensor
|
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ads1115
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
ads1115:
|
<<: !include common.yaml
|
||||||
address: 0x48
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: ads1115
|
|
||||||
multiplexer: A0_A1
|
|
||||||
gain: 1.024
|
|
||||||
sample_rate: 128
|
|
||||||
id: ads1115_sensor
|
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ads1115
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
ads1115:
|
<<: !include common.yaml
|
||||||
address: 0x48
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: ads1115
|
|
||||||
multiplexer: A0_A1
|
|
||||||
gain: 1.024
|
|
||||||
sample_rate: 128
|
|
||||||
id: ads1115_sensor
|
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ads1115
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
ads1115:
|
<<: !include common.yaml
|
||||||
address: 0x48
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: ads1115
|
|
||||||
multiplexer: A0_A1
|
|
||||||
gain: 1.024
|
|
||||||
sample_rate: 128
|
|
||||||
id: ads1115_sensor
|
|
||||||
|
12
tests/components/ags10/common.yaml
Normal file
12
tests/components/ags10/common.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_ags10
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
frequency: 10kHz
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: ags10
|
||||||
|
id: ags10_1
|
||||||
|
tvoc:
|
||||||
|
name: AGS10 TVOC
|
||||||
|
update_interval: 60s
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ags10
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
frequency: 10kHz
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ags10
|
|
||||||
id: ags10_1
|
|
||||||
tvoc:
|
|
||||||
name: AGS10 TVOC
|
|
||||||
update_interval: 60s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ags10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
frequency: 10kHz
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ags10
|
|
||||||
id: ags10_1
|
|
||||||
tvoc:
|
|
||||||
name: AGS10 TVOC
|
|
||||||
update_interval: 60s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ags10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
frequency: 10kHz
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ags10
|
|
||||||
id: ags10_1
|
|
||||||
tvoc:
|
|
||||||
name: AGS10 TVOC
|
|
||||||
update_interval: 60s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ags10
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
frequency: 10kHz
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ags10
|
|
||||||
id: ags10_1
|
|
||||||
tvoc:
|
|
||||||
name: AGS10 TVOC
|
|
||||||
update_interval: 60s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_ags10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
frequency: 10kHz
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: ags10
|
|
||||||
id: ags10_1
|
|
||||||
tvoc:
|
|
||||||
name: AGS10 TVOC
|
|
||||||
update_interval: 60s
|
|
||||||
|
11
tests/components/aht10/common.yaml
Normal file
11
tests/components/aht10/common.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_aht10
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: aht10
|
||||||
|
temperature:
|
||||||
|
name: Temperature
|
||||||
|
humidity:
|
||||||
|
name: Humidity
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_aht10
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: aht10
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_aht10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: aht10
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_aht10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: aht10
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_aht10
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: aht10
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_aht10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: aht10
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_aht10
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: aht10
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
11
tests/components/am2315c/common.yaml
Normal file
11
tests/components/am2315c/common.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_am2315c
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: am2315c
|
||||||
|
temperature:
|
||||||
|
name: Temperature
|
||||||
|
humidity:
|
||||||
|
name: Humidity
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_am2315c
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2315c
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_am2315c
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2315c
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_am2315c
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2315c
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_am2315c
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2315c
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_am2315c
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2315c
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_am2315c
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2315c
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
11
tests/components/am2320/common.yaml
Normal file
11
tests/components/am2320/common.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_am2320
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: am2320
|
||||||
|
temperature:
|
||||||
|
name: Temperature
|
||||||
|
humidity:
|
||||||
|
name: Humidity
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2320
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2320
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2320
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2320
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2320
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: am2320
|
|
||||||
temperature:
|
|
||||||
name: Temperature
|
|
||||||
humidity:
|
|
||||||
name: Humidity
|
|
||||||
|
48
tests/components/apds9960/common.yaml
Normal file
48
tests/components/apds9960/common.yaml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_apds9960
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
apds9960:
|
||||||
|
address: 0x20
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: apds9960
|
||||||
|
id: apds9960_binary_sensor
|
||||||
|
direction: up
|
||||||
|
name: APDS9960 Up
|
||||||
|
device_class: motion
|
||||||
|
filters:
|
||||||
|
- invert
|
||||||
|
- delayed_on: 20ms
|
||||||
|
- delayed_off: 20ms
|
||||||
|
- lambda: "return false;"
|
||||||
|
on_state:
|
||||||
|
- logger.log: New state
|
||||||
|
- platform: apds9960
|
||||||
|
direction: down
|
||||||
|
name: APDS9960 Down
|
||||||
|
- platform: apds9960
|
||||||
|
direction: left
|
||||||
|
name: APDS9960 Left
|
||||||
|
- platform: apds9960
|
||||||
|
direction: right
|
||||||
|
name: APDS9960 Right
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: apds9960
|
||||||
|
type: proximity
|
||||||
|
name: APDS9960 Proximity
|
||||||
|
- platform: apds9960
|
||||||
|
type: clear
|
||||||
|
name: APDS9960 Clear
|
||||||
|
- platform: apds9960
|
||||||
|
type: red
|
||||||
|
name: APDS9960 Red
|
||||||
|
- platform: apds9960
|
||||||
|
type: green
|
||||||
|
name: APDS9960 Green
|
||||||
|
- platform: apds9960
|
||||||
|
type: blue
|
||||||
|
name: APDS9960 Blue
|
@ -1,48 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
apds9960:
|
<<: !include common.yaml
|
||||||
address: 0x20
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
id: apds9960_binary_sensor
|
|
||||||
direction: up
|
|
||||||
name: APDS9960 Up
|
|
||||||
device_class: motion
|
|
||||||
filters:
|
|
||||||
- invert
|
|
||||||
- delayed_on: 20ms
|
|
||||||
- delayed_off: 20ms
|
|
||||||
- lambda: "return false;"
|
|
||||||
on_state:
|
|
||||||
- logger.log: New state
|
|
||||||
- platform: apds9960
|
|
||||||
direction: down
|
|
||||||
name: APDS9960 Down
|
|
||||||
- platform: apds9960
|
|
||||||
direction: left
|
|
||||||
name: APDS9960 Left
|
|
||||||
- platform: apds9960
|
|
||||||
direction: right
|
|
||||||
name: APDS9960 Right
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
type: proximity
|
|
||||||
name: APDS9960 Proximity
|
|
||||||
- platform: apds9960
|
|
||||||
type: clear
|
|
||||||
name: APDS9960 Clear
|
|
||||||
- platform: apds9960
|
|
||||||
type: red
|
|
||||||
name: APDS9960 Red
|
|
||||||
- platform: apds9960
|
|
||||||
type: green
|
|
||||||
name: APDS9960 Green
|
|
||||||
- platform: apds9960
|
|
||||||
type: blue
|
|
||||||
name: APDS9960 Blue
|
|
||||||
|
@ -1,48 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
apds9960:
|
<<: !include common.yaml
|
||||||
address: 0x20
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
id: apds9960_binary_sensor
|
|
||||||
direction: up
|
|
||||||
name: APDS9960 Up
|
|
||||||
device_class: motion
|
|
||||||
filters:
|
|
||||||
- invert
|
|
||||||
- delayed_on: 20ms
|
|
||||||
- delayed_off: 20ms
|
|
||||||
- lambda: "return false;"
|
|
||||||
on_state:
|
|
||||||
- logger.log: New state
|
|
||||||
- platform: apds9960
|
|
||||||
direction: down
|
|
||||||
name: APDS9960 Down
|
|
||||||
- platform: apds9960
|
|
||||||
direction: left
|
|
||||||
name: APDS9960 Left
|
|
||||||
- platform: apds9960
|
|
||||||
direction: right
|
|
||||||
name: APDS9960 Right
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
type: proximity
|
|
||||||
name: APDS9960 Proximity
|
|
||||||
- platform: apds9960
|
|
||||||
type: clear
|
|
||||||
name: APDS9960 Clear
|
|
||||||
- platform: apds9960
|
|
||||||
type: red
|
|
||||||
name: APDS9960 Red
|
|
||||||
- platform: apds9960
|
|
||||||
type: green
|
|
||||||
name: APDS9960 Green
|
|
||||||
- platform: apds9960
|
|
||||||
type: blue
|
|
||||||
name: APDS9960 Blue
|
|
||||||
|
@ -1,48 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
apds9960:
|
<<: !include common.yaml
|
||||||
address: 0x20
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
id: apds9960_binary_sensor
|
|
||||||
direction: up
|
|
||||||
name: APDS9960 Up
|
|
||||||
device_class: motion
|
|
||||||
filters:
|
|
||||||
- invert
|
|
||||||
- delayed_on: 20ms
|
|
||||||
- delayed_off: 20ms
|
|
||||||
- lambda: "return false;"
|
|
||||||
on_state:
|
|
||||||
- logger.log: New state
|
|
||||||
- platform: apds9960
|
|
||||||
direction: down
|
|
||||||
name: APDS9960 Down
|
|
||||||
- platform: apds9960
|
|
||||||
direction: left
|
|
||||||
name: APDS9960 Left
|
|
||||||
- platform: apds9960
|
|
||||||
direction: right
|
|
||||||
name: APDS9960 Right
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
type: proximity
|
|
||||||
name: APDS9960 Proximity
|
|
||||||
- platform: apds9960
|
|
||||||
type: clear
|
|
||||||
name: APDS9960 Clear
|
|
||||||
- platform: apds9960
|
|
||||||
type: red
|
|
||||||
name: APDS9960 Red
|
|
||||||
- platform: apds9960
|
|
||||||
type: green
|
|
||||||
name: APDS9960 Green
|
|
||||||
- platform: apds9960
|
|
||||||
type: blue
|
|
||||||
name: APDS9960 Blue
|
|
||||||
|
@ -1,48 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
apds9960:
|
<<: !include common.yaml
|
||||||
address: 0x20
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
id: apds9960_binary_sensor
|
|
||||||
direction: up
|
|
||||||
name: APDS9960 Up
|
|
||||||
device_class: motion
|
|
||||||
filters:
|
|
||||||
- invert
|
|
||||||
- delayed_on: 20ms
|
|
||||||
- delayed_off: 20ms
|
|
||||||
- lambda: "return false;"
|
|
||||||
on_state:
|
|
||||||
- logger.log: New state
|
|
||||||
- platform: apds9960
|
|
||||||
direction: down
|
|
||||||
name: APDS9960 Down
|
|
||||||
- platform: apds9960
|
|
||||||
direction: left
|
|
||||||
name: APDS9960 Left
|
|
||||||
- platform: apds9960
|
|
||||||
direction: right
|
|
||||||
name: APDS9960 Right
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
type: proximity
|
|
||||||
name: APDS9960 Proximity
|
|
||||||
- platform: apds9960
|
|
||||||
type: clear
|
|
||||||
name: APDS9960 Clear
|
|
||||||
- platform: apds9960
|
|
||||||
type: red
|
|
||||||
name: APDS9960 Red
|
|
||||||
- platform: apds9960
|
|
||||||
type: green
|
|
||||||
name: APDS9960 Green
|
|
||||||
- platform: apds9960
|
|
||||||
type: blue
|
|
||||||
name: APDS9960 Blue
|
|
||||||
|
@ -1,48 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
apds9960:
|
<<: !include common.yaml
|
||||||
address: 0x20
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
id: apds9960_binary_sensor
|
|
||||||
direction: up
|
|
||||||
name: APDS9960 Up
|
|
||||||
device_class: motion
|
|
||||||
filters:
|
|
||||||
- invert
|
|
||||||
- delayed_on: 20ms
|
|
||||||
- delayed_off: 20ms
|
|
||||||
- lambda: "return false;"
|
|
||||||
on_state:
|
|
||||||
- logger.log: New state
|
|
||||||
- platform: apds9960
|
|
||||||
direction: down
|
|
||||||
name: APDS9960 Down
|
|
||||||
- platform: apds9960
|
|
||||||
direction: left
|
|
||||||
name: APDS9960 Left
|
|
||||||
- platform: apds9960
|
|
||||||
direction: right
|
|
||||||
name: APDS9960 Right
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
type: proximity
|
|
||||||
name: APDS9960 Proximity
|
|
||||||
- platform: apds9960
|
|
||||||
type: clear
|
|
||||||
name: APDS9960 Clear
|
|
||||||
- platform: apds9960
|
|
||||||
type: red
|
|
||||||
name: APDS9960 Red
|
|
||||||
- platform: apds9960
|
|
||||||
type: green
|
|
||||||
name: APDS9960 Green
|
|
||||||
- platform: apds9960
|
|
||||||
type: blue
|
|
||||||
name: APDS9960 Blue
|
|
||||||
|
@ -1,48 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_bme280
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
apds9960:
|
<<: !include common.yaml
|
||||||
address: 0x20
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
id: apds9960_binary_sensor
|
|
||||||
direction: up
|
|
||||||
name: APDS9960 Up
|
|
||||||
device_class: motion
|
|
||||||
filters:
|
|
||||||
- invert
|
|
||||||
- delayed_on: 20ms
|
|
||||||
- delayed_off: 20ms
|
|
||||||
- lambda: "return false;"
|
|
||||||
on_state:
|
|
||||||
- logger.log: New state
|
|
||||||
- platform: apds9960
|
|
||||||
direction: down
|
|
||||||
name: APDS9960 Down
|
|
||||||
- platform: apds9960
|
|
||||||
direction: left
|
|
||||||
name: APDS9960 Left
|
|
||||||
- platform: apds9960
|
|
||||||
direction: right
|
|
||||||
name: APDS9960 Right
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: apds9960
|
|
||||||
type: proximity
|
|
||||||
name: APDS9960 Proximity
|
|
||||||
- platform: apds9960
|
|
||||||
type: clear
|
|
||||||
name: APDS9960 Clear
|
|
||||||
- platform: apds9960
|
|
||||||
type: red
|
|
||||||
name: APDS9960 Red
|
|
||||||
- platform: apds9960
|
|
||||||
type: green
|
|
||||||
name: APDS9960 Green
|
|
||||||
- platform: apds9960
|
|
||||||
type: blue
|
|
||||||
name: APDS9960 Blue
|
|
||||||
|
18
tests/components/as3935_i2c/common.yaml
Normal file
18
tests/components/as3935_i2c/common.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_as3935
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
as3935_i2c:
|
||||||
|
irq_pin: ${irq_pin}
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: as3935
|
||||||
|
name: Storm Alert
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: as3935
|
||||||
|
lightning_energy:
|
||||||
|
name: Lightning Energy
|
||||||
|
distance:
|
||||||
|
name: Distance Storm
|
@ -1,18 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_as3935
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
irq_pin: GPIO15
|
||||||
|
|
||||||
as3935_i2c:
|
<<: !include common.yaml
|
||||||
irq_pin: 12
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: as3935
|
|
||||||
name: Storm Alert
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: as3935
|
|
||||||
lightning_energy:
|
|
||||||
name: Lightning Energy
|
|
||||||
distance:
|
|
||||||
name: Distance Storm
|
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_as3935
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO6
|
||||||
|
|
||||||
as3935_i2c:
|
<<: !include common.yaml
|
||||||
irq_pin: 6
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: as3935
|
|
||||||
name: Storm Alert
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: as3935
|
|
||||||
lightning_energy:
|
|
||||||
name: Lightning Energy
|
|
||||||
distance:
|
|
||||||
name: Distance Storm
|
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_as3935
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO6
|
||||||
|
|
||||||
as3935_i2c:
|
<<: !include common.yaml
|
||||||
irq_pin: 6
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: as3935
|
|
||||||
name: Storm Alert
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: as3935
|
|
||||||
lightning_energy:
|
|
||||||
name: Lightning Energy
|
|
||||||
distance:
|
|
||||||
name: Distance Storm
|
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_as3935
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
irq_pin: GPIO15
|
||||||
|
|
||||||
as3935_i2c:
|
<<: !include common.yaml
|
||||||
irq_pin: 12
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: as3935
|
|
||||||
name: Storm Alert
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: as3935
|
|
||||||
lightning_energy:
|
|
||||||
name: Lightning Energy
|
|
||||||
distance:
|
|
||||||
name: Distance Storm
|
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_as3935
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO15
|
||||||
|
|
||||||
as3935_i2c:
|
<<: !include common.yaml
|
||||||
irq_pin: 15
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: as3935
|
|
||||||
name: Storm Alert
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: as3935
|
|
||||||
lightning_energy:
|
|
||||||
name: Lightning Energy
|
|
||||||
distance:
|
|
||||||
name: Distance Storm
|
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_as3935
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
irq_pin: GPIO6
|
||||||
|
|
||||||
as3935_i2c:
|
<<: !include common.yaml
|
||||||
irq_pin: 6
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: as3935
|
|
||||||
name: Storm Alert
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: as3935
|
|
||||||
lightning_energy:
|
|
||||||
name: Lightning Energy
|
|
||||||
distance:
|
|
||||||
name: Distance Storm
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user