mirror of
https://github.com/esphome/esphome.git
synced 2025-02-14 17:08:22 +00:00
[CI] Consolidate some tests (M) (#8202)
This commit is contained in:
parent
4273449003
commit
4e4566361f
13
tests/components/max31855/common.yaml
Normal file
13
tests/components/max31855/common.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_max31855
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: max31855
|
||||||
|
name: MAX31855 Temperature
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
update_interval: 15s
|
||||||
|
reference_temperature:
|
||||||
|
name: MAX31855 Internal Temperature
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31855
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31855
|
|
||||||
name: MAX31855 Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
reference_temperature:
|
|
||||||
name: MAX31855 Internal Temperature
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31855
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31855
|
|
||||||
name: MAX31855 Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
reference_temperature:
|
|
||||||
name: MAX31855 Internal Temperature
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31855
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31855
|
|
||||||
name: MAX31855 Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
reference_temperature:
|
|
||||||
name: MAX31855 Internal Temperature
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31855
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31855
|
|
||||||
name: MAX31855 Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
reference_temperature:
|
|
||||||
name: MAX31855 Internal Temperature
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31855
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31855
|
|
||||||
name: MAX31855 Temperature
|
|
||||||
cs_pin: 15
|
|
||||||
update_interval: 15s
|
|
||||||
reference_temperature:
|
|
||||||
name: MAX31855 Internal Temperature
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31855
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31855
|
|
||||||
name: MAX31855 Temperature
|
|
||||||
cs_pin: 6
|
|
||||||
update_interval: 15s
|
|
||||||
reference_temperature:
|
|
||||||
name: MAX31855 Internal Temperature
|
|
||||||
|
13
tests/components/max31856/common.yaml
Normal file
13
tests/components/max31856/common.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_max31856
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: max31856
|
||||||
|
name: MAX31856 Temperature
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
update_interval: 15s
|
||||||
|
mains_filter: 50Hz
|
||||||
|
thermocouple_type: N
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31856
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31856
|
|
||||||
name: MAX31856 Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
mains_filter: 50Hz
|
|
||||||
thermocouple_type: N
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31856
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: max31856
|
|
||||||
name: MAX31856 Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
mains_filter: 50Hz
|
|
||||||
thermocouple_type: N
|
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31856
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: max31856
|
|
||||||
name: MAX31856 Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
mains_filter: 50Hz
|
|
||||||
thermocouple_type: N
|
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31856
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31856
|
|
||||||
name: MAX31856 Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
mains_filter: 50Hz
|
|
||||||
thermocouple_type: N
|
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31856
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: max31856
|
|
||||||
name: MAX31856 Temperature
|
|
||||||
cs_pin: 15
|
|
||||||
update_interval: 15s
|
|
||||||
mains_filter: 50Hz
|
|
||||||
thermocouple_type: N
|
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31856
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: max31856
|
|
||||||
name: MAX31856 Temperature
|
|
||||||
cs_pin: 6
|
|
||||||
update_interval: 15s
|
|
||||||
mains_filter: 50Hz
|
|
||||||
thermocouple_type: N
|
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
|
13
tests/components/max31865/common.yaml
Normal file
13
tests/components/max31865/common.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_max31865
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: max31865
|
||||||
|
name: MAX31865 Temperature
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
update_interval: 15s
|
||||||
|
reference_resistance: 430 Ω
|
||||||
|
rtd_nominal_resistance: 100 Ω
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31865
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31865
|
|
||||||
name: MAX31865 Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
reference_resistance: 430 Ω
|
|
||||||
rtd_nominal_resistance: 100 Ω
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31865
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31865
|
|
||||||
name: MAX31865 Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
reference_resistance: 430 Ω
|
|
||||||
rtd_nominal_resistance: 100 Ω
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31865
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31865
|
|
||||||
name: MAX31865 Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
reference_resistance: 430 Ω
|
|
||||||
rtd_nominal_resistance: 100 Ω
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31865
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31865
|
|
||||||
name: MAX31865 Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
reference_resistance: 430 Ω
|
|
||||||
rtd_nominal_resistance: 100 Ω
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31865
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31865
|
|
||||||
name: MAX31865 Temperature
|
|
||||||
cs_pin: 15
|
|
||||||
update_interval: 15s
|
|
||||||
reference_resistance: 430 Ω
|
|
||||||
rtd_nominal_resistance: 100 Ω
|
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max31865
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max31865
|
|
||||||
name: MAX31865 Temperature
|
|
||||||
cs_pin: 6
|
|
||||||
update_interval: 15s
|
|
||||||
reference_resistance: 430 Ω
|
|
||||||
rtd_nominal_resistance: 100 Ω
|
|
||||||
|
12
tests/components/max44009/common.yaml
Normal file
12
tests/components/max44009/common.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_max44009
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: max44009
|
||||||
|
name: MAX44009 Brightness
|
||||||
|
internal: true
|
||||||
|
mode: low_power
|
||||||
|
address: 0x4A
|
||||||
|
update_interval: 30s
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max44009
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max44009
|
|
||||||
name: MAX44009 Brightness
|
|
||||||
internal: true
|
|
||||||
mode: low_power
|
|
||||||
address: 0x4A
|
|
||||||
update_interval: 30s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max44009
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max44009
|
|
||||||
name: MAX44009 Brightness
|
|
||||||
internal: true
|
|
||||||
mode: low_power
|
|
||||||
address: 0x4A
|
|
||||||
update_interval: 30s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max44009
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max44009
|
|
||||||
name: MAX44009 Brightness
|
|
||||||
internal: true
|
|
||||||
mode: low_power
|
|
||||||
address: 0x4A
|
|
||||||
update_interval: 30s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max44009
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max44009
|
|
||||||
name: MAX44009 Brightness
|
|
||||||
internal: true
|
|
||||||
mode: low_power
|
|
||||||
address: 0x4A
|
|
||||||
update_interval: 30s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max44009
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max44009
|
|
||||||
name: MAX44009 Brightness
|
|
||||||
internal: true
|
|
||||||
mode: low_power
|
|
||||||
address: 0x4A
|
|
||||||
update_interval: 30s
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max44009
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max44009
|
|
||||||
name: MAX44009 Brightness
|
|
||||||
internal: true
|
|
||||||
mode: low_power
|
|
||||||
address: 0x4A
|
|
||||||
update_interval: 30s
|
|
||||||
|
11
tests/components/max6675/common.yaml
Normal file
11
tests/components/max6675/common.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_max6675
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: max6675
|
||||||
|
name: Temperature
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
update_interval: 15s
|
@ -1,11 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max6675
|
|
||||||
name: Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max6675
|
|
||||||
name: Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max6675
|
|
||||||
name: Temperature
|
|
||||||
cs_pin: 8
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max6675
|
|
||||||
name: Temperature
|
|
||||||
cs_pin: 12
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max6675
|
|
||||||
name: Temperature
|
|
||||||
cs_pin: 15
|
|
||||||
update_interval: 15s
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max6675
|
|
||||||
name: Temperature
|
|
||||||
cs_pin: 6
|
|
||||||
update_interval: 15s
|
|
||||||
|
19
tests/components/max6956/common.yaml
Normal file
19
tests/components/max6956/common.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_max6956
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
max6956:
|
||||||
|
- id: max6956_1
|
||||||
|
address: 0x40
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
name: Max Input Pin
|
||||||
|
pin:
|
||||||
|
max6956: max6956_1
|
||||||
|
number: 4
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
|
inverted: false
|
@ -1,19 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max6956
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
max6956:
|
<<: !include common.yaml
|
||||||
- id: max6956_1
|
|
||||||
address: 0x40
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
name: Max Input Pin 4
|
|
||||||
pin:
|
|
||||||
max6956: max6956_1
|
|
||||||
number: 4
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
inverted: false
|
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max6956
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
max6956:
|
<<: !include common.yaml
|
||||||
- id: max6956_1
|
|
||||||
address: 0x40
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
name: Max Input Pin 4
|
|
||||||
pin:
|
|
||||||
max6956: max6956_1
|
|
||||||
number: 4
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
inverted: false
|
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max6956
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
max6956:
|
<<: !include common.yaml
|
||||||
- id: max6956_1
|
|
||||||
address: 0x40
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
name: Max Input Pin 4
|
|
||||||
pin:
|
|
||||||
max6956: max6956_1
|
|
||||||
number: 4
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
inverted: false
|
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max6956
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
max6956:
|
<<: !include common.yaml
|
||||||
- id: max6956_1
|
|
||||||
address: 0x40
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
name: Max Input Pin 4
|
|
||||||
pin:
|
|
||||||
max6956: max6956_1
|
|
||||||
number: 4
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
inverted: false
|
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max6956
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
max6956:
|
<<: !include common.yaml
|
||||||
- id: max6956_1
|
|
||||||
address: 0x40
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
name: Max Input Pin 4
|
|
||||||
pin:
|
|
||||||
max6956: max6956_1
|
|
||||||
number: 4
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
inverted: false
|
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max6956
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
max6956:
|
<<: !include common.yaml
|
||||||
- id: max6956_1
|
|
||||||
address: 0x40
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
name: Max Input Pin 4
|
|
||||||
pin:
|
|
||||||
max6956: max6956_1
|
|
||||||
number: 4
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
inverted: false
|
|
||||||
|
12
tests/components/max7219/common.yaml
Normal file
12
tests/components/max7219/common.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_max6675
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
display:
|
||||||
|
- platform: max7219
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
num_chips: 1
|
||||||
|
lambda: |-
|
||||||
|
it.print("01234567");
|
@ -1,12 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219
|
|
||||||
cs_pin: 12
|
|
||||||
num_chips: 1
|
|
||||||
lambda: |-
|
|
||||||
it.print("01234567");
|
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219
|
|
||||||
cs_pin: 8
|
|
||||||
num_chips: 1
|
|
||||||
lambda: |-
|
|
||||||
it.print("01234567");
|
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219
|
|
||||||
cs_pin: 8
|
|
||||||
num_chips: 1
|
|
||||||
lambda: |-
|
|
||||||
it.print("01234567");
|
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219
|
|
||||||
cs_pin: 12
|
|
||||||
num_chips: 1
|
|
||||||
lambda: |-
|
|
||||||
it.print("01234567");
|
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219
|
|
||||||
cs_pin: 15
|
|
||||||
num_chips: 1
|
|
||||||
lambda: |-
|
|
||||||
it.print("01234567");
|
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max6675
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219
|
|
||||||
cs_pin: 6
|
|
||||||
num_chips: 1
|
|
||||||
lambda: |-
|
|
||||||
it.print("01234567");
|
|
||||||
|
16
tests/components/max7219digit/common.yaml
Normal file
16
tests/components/max7219digit/common.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_max7219digit
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
display:
|
||||||
|
- platform: max7219digit
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
num_chips: 4
|
||||||
|
rotate_chip: 0
|
||||||
|
intensity: 10
|
||||||
|
scroll_mode: STOP
|
||||||
|
id: my_matrix
|
||||||
|
lambda: |-
|
||||||
|
it.printdigit("hello");
|
@ -1,16 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219digit
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219digit
|
|
||||||
cs_pin: 12
|
|
||||||
num_chips: 4
|
|
||||||
rotate_chip: 0
|
|
||||||
intensity: 10
|
|
||||||
scroll_mode: STOP
|
|
||||||
id: my_matrix
|
|
||||||
lambda: |-
|
|
||||||
it.printdigit("hello");
|
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219digit
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219digit
|
|
||||||
cs_pin: 8
|
|
||||||
num_chips: 4
|
|
||||||
rotate_chip: 0
|
|
||||||
intensity: 10
|
|
||||||
scroll_mode: STOP
|
|
||||||
id: my_matrix
|
|
||||||
lambda: |-
|
|
||||||
it.printdigit("hello");
|
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219digit
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219digit
|
|
||||||
cs_pin: 8
|
|
||||||
num_chips: 4
|
|
||||||
rotate_chip: 0
|
|
||||||
intensity: 10
|
|
||||||
scroll_mode: STOP
|
|
||||||
id: my_matrix
|
|
||||||
lambda: |-
|
|
||||||
it.printdigit("hello");
|
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219digit
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219digit
|
|
||||||
cs_pin: 12
|
|
||||||
num_chips: 4
|
|
||||||
rotate_chip: 0
|
|
||||||
intensity: 10
|
|
||||||
scroll_mode: STOP
|
|
||||||
id: my_matrix
|
|
||||||
lambda: |-
|
|
||||||
it.printdigit("hello");
|
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219digit
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219digit
|
|
||||||
cs_pin: 15
|
|
||||||
num_chips: 4
|
|
||||||
rotate_chip: 0
|
|
||||||
intensity: 10
|
|
||||||
scroll_mode: STOP
|
|
||||||
id: my_matrix
|
|
||||||
lambda: |-
|
|
||||||
it.printdigit("hello");
|
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_max7219digit
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
display:
|
<<: !include common.yaml
|
||||||
- platform: max7219digit
|
|
||||||
cs_pin: 6
|
|
||||||
num_chips: 4
|
|
||||||
rotate_chip: 0
|
|
||||||
intensity: 10
|
|
||||||
scroll_mode: STOP
|
|
||||||
id: my_matrix
|
|
||||||
lambda: |-
|
|
||||||
it.printdigit("hello");
|
|
||||||
|
18
tests/components/max9611/common.yaml
Normal file
18
tests/components/max9611/common.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_max9611
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: max9611
|
||||||
|
shunt_resistance: 0.2 ohm
|
||||||
|
gain: 1X
|
||||||
|
voltage:
|
||||||
|
name: Max9611 Voltage
|
||||||
|
current:
|
||||||
|
name: Max9611 Current
|
||||||
|
power:
|
||||||
|
name: Max9611 Watts
|
||||||
|
temperature:
|
||||||
|
name: Max9611 Temperature
|
||||||
|
update_interval: 1s
|
@ -1,18 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max9611
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max9611
|
|
||||||
shunt_resistance: 0.2 ohm
|
|
||||||
gain: 1X
|
|
||||||
voltage:
|
|
||||||
name: Max9611 Voltage
|
|
||||||
current:
|
|
||||||
name: Max9611 Current
|
|
||||||
power:
|
|
||||||
name: Max9611 Watts
|
|
||||||
temperature:
|
|
||||||
name: Max9611 Temp
|
|
||||||
update_interval: 1s
|
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max9611
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max9611
|
|
||||||
shunt_resistance: 0.2 ohm
|
|
||||||
gain: 1X
|
|
||||||
voltage:
|
|
||||||
name: Max9611 Voltage
|
|
||||||
current:
|
|
||||||
name: Max9611 Current
|
|
||||||
power:
|
|
||||||
name: Max9611 Watts
|
|
||||||
temperature:
|
|
||||||
name: Max9611 Temp
|
|
||||||
update_interval: 1s
|
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max9611
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max9611
|
|
||||||
shunt_resistance: 0.2 ohm
|
|
||||||
gain: 1X
|
|
||||||
voltage:
|
|
||||||
name: Max9611 Voltage
|
|
||||||
current:
|
|
||||||
name: Max9611 Current
|
|
||||||
power:
|
|
||||||
name: Max9611 Watts
|
|
||||||
temperature:
|
|
||||||
name: Max9611 Temp
|
|
||||||
update_interval: 1s
|
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max9611
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max9611
|
|
||||||
shunt_resistance: 0.2 ohm
|
|
||||||
gain: 1X
|
|
||||||
voltage:
|
|
||||||
name: Max9611 Voltage
|
|
||||||
current:
|
|
||||||
name: Max9611 Current
|
|
||||||
power:
|
|
||||||
name: Max9611 Watts
|
|
||||||
temperature:
|
|
||||||
name: Max9611 Temp
|
|
||||||
update_interval: 1s
|
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max9611
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max9611
|
|
||||||
shunt_resistance: 0.2 ohm
|
|
||||||
gain: 1X
|
|
||||||
voltage:
|
|
||||||
name: Max9611 Voltage
|
|
||||||
current:
|
|
||||||
name: Max9611 Current
|
|
||||||
power:
|
|
||||||
name: Max9611 Watts
|
|
||||||
temperature:
|
|
||||||
name: Max9611 Temp
|
|
||||||
update_interval: 1s
|
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_max9611
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: max9611
|
|
||||||
shunt_resistance: 0.2 ohm
|
|
||||||
gain: 1X
|
|
||||||
voltage:
|
|
||||||
name: Max9611 Voltage
|
|
||||||
current:
|
|
||||||
name: Max9611 Current
|
|
||||||
power:
|
|
||||||
name: Max9611 Watts
|
|
||||||
temperature:
|
|
||||||
name: Max9611 Temp
|
|
||||||
update_interval: 1s
|
|
||||||
|
23
tests/components/mcp23008/common.yaml
Normal file
23
tests/components/mcp23008/common.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_mcp23008
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
mcp23008:
|
||||||
|
id: mcp23008_hub
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
id: mcp23008_binary_sensor
|
||||||
|
pin:
|
||||||
|
mcp23xxx: mcp23008_hub
|
||||||
|
number: 0
|
||||||
|
mode: INPUT
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
id: mcp23008_switch
|
||||||
|
pin:
|
||||||
|
mcp23xxx: mcp23008_hub
|
||||||
|
number: 1
|
||||||
|
mode: OUTPUT
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23008
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
mcp23008:
|
<<: !include common.yaml
|
||||||
id: mcp23008_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23008
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23008:
|
<<: !include common.yaml
|
||||||
id: mcp23008_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23008
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23008:
|
<<: !include common.yaml
|
||||||
id: mcp23008_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23008
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
mcp23008:
|
<<: !include common.yaml
|
||||||
id: mcp23008_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23008
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23008:
|
<<: !include common.yaml
|
||||||
id: mcp23008_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23008
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23008:
|
<<: !include common.yaml
|
||||||
id: mcp23008_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23008_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23008_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
23
tests/components/mcp23016/common.yaml
Normal file
23
tests/components/mcp23016/common.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_mcp23016
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
mcp23016:
|
||||||
|
id: mcp23016_hub
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
id: mcp23016_binary_sensor
|
||||||
|
pin:
|
||||||
|
mcp23016: mcp23016_hub
|
||||||
|
number: 0
|
||||||
|
mode: INPUT
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
id: mcp23016_switch
|
||||||
|
pin:
|
||||||
|
mcp23016: mcp23016_hub
|
||||||
|
number: 1
|
||||||
|
mode: OUTPUT
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23016
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
mcp23016:
|
<<: !include common.yaml
|
||||||
id: mcp23016_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_switch
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23016
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23016:
|
<<: !include common.yaml
|
||||||
id: mcp23016_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_switch
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23016
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23016:
|
<<: !include common.yaml
|
||||||
id: mcp23016_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_switch
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23016
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
mcp23016:
|
<<: !include common.yaml
|
||||||
id: mcp23016_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_switch
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23016
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23016:
|
<<: !include common.yaml
|
||||||
id: mcp23016_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_switch
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23016
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23016:
|
<<: !include common.yaml
|
||||||
id: mcp23016_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23016_switch
|
|
||||||
pin:
|
|
||||||
mcp23016: mcp23016_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
23
tests/components/mcp23017/common.yaml
Normal file
23
tests/components/mcp23017/common.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
i2c:
|
||||||
|
- id: i2c_mcp23017
|
||||||
|
scl: ${scl_pin}
|
||||||
|
sda: ${sda_pin}
|
||||||
|
|
||||||
|
mcp23017:
|
||||||
|
id: mcp23017_hub
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
id: mcp23017_binary_sensor
|
||||||
|
pin:
|
||||||
|
mcp23xxx: mcp23017_hub
|
||||||
|
number: 0
|
||||||
|
mode: INPUT
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
id: mcp23017_switch
|
||||||
|
pin:
|
||||||
|
mcp23xxx: mcp23017_hub
|
||||||
|
number: 1
|
||||||
|
mode: OUTPUT
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23017
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
mcp23017:
|
<<: !include common.yaml
|
||||||
id: mcp23017_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23017
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23017:
|
<<: !include common.yaml
|
||||||
id: mcp23017_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23017
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23017:
|
<<: !include common.yaml
|
||||||
id: mcp23017_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23017
|
scl_pin: GPIO16
|
||||||
scl: 16
|
sda_pin: GPIO17
|
||||||
sda: 17
|
|
||||||
|
|
||||||
mcp23017:
|
<<: !include common.yaml
|
||||||
id: mcp23017_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23017
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23017:
|
<<: !include common.yaml
|
||||||
id: mcp23017_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
@ -1,23 +1,5 @@
|
|||||||
i2c:
|
substitutions:
|
||||||
- id: i2c_mcp23017
|
scl_pin: GPIO5
|
||||||
scl: 5
|
sda_pin: GPIO4
|
||||||
sda: 4
|
|
||||||
|
|
||||||
mcp23017:
|
<<: !include common.yaml
|
||||||
id: mcp23017_hub
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_binary_sensor
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 0
|
|
||||||
mode: INPUT
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
id: mcp23017_switch
|
|
||||||
pin:
|
|
||||||
mcp23xxx: mcp23017_hub
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
|
10
tests/components/mcp23s08/common.yaml
Normal file
10
tests/components/mcp23s08/common.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_mcp23s08
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
mcp23s08:
|
||||||
|
- id: mcp23s08_hub
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
deviceaddress: 0
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s08
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
mcp23s08:
|
<<: !include common.yaml
|
||||||
- id: mcp23s08_hub
|
|
||||||
cs_pin: 12
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s08
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
mcp23s08:
|
<<: !include common.yaml
|
||||||
- id: mcp23s08_hub
|
|
||||||
cs_pin: 8
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s08
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
mcp23s08:
|
<<: !include common.yaml
|
||||||
- id: mcp23s08_hub
|
|
||||||
cs_pin: 8
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s08
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
mcp23s08:
|
<<: !include common.yaml
|
||||||
- id: mcp23s08_hub
|
|
||||||
cs_pin: 12
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s08
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
mcp23s08:
|
<<: !include common.yaml
|
||||||
- id: mcp23s08_hub
|
|
||||||
cs_pin: 15
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s08
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
mcp23s08:
|
<<: !include common.yaml
|
||||||
- id: mcp23s08_hub
|
|
||||||
cs_pin: 6
|
|
||||||
deviceaddress: 0
|
|
||||||
|
10
tests/components/mcp23s17/common.yaml
Normal file
10
tests/components/mcp23s17/common.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_mcp23s17
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
mcp23s17:
|
||||||
|
- id: mcp23s17_hub
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
deviceaddress: 0
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s17
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
mcp23s17:
|
<<: !include common.yaml
|
||||||
- id: mcp23s17_hub
|
|
||||||
cs_pin: 12
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s17
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
mcp23s17:
|
<<: !include common.yaml
|
||||||
- id: mcp23s17_hub
|
|
||||||
cs_pin: 8
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s17
|
clk_pin: GPIO6
|
||||||
clk_pin: 6
|
mosi_pin: GPIO7
|
||||||
mosi_pin: 7
|
miso_pin: GPIO5
|
||||||
miso_pin: 5
|
cs_pin: GPIO8
|
||||||
|
|
||||||
mcp23s17:
|
<<: !include common.yaml
|
||||||
- id: mcp23s17_hub
|
|
||||||
cs_pin: 8
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s17
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
mcp23s17:
|
<<: !include common.yaml
|
||||||
- id: mcp23s17_hub
|
|
||||||
cs_pin: 12
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s17
|
clk_pin: GPIO14
|
||||||
clk_pin: 14
|
mosi_pin: GPIO13
|
||||||
mosi_pin: 13
|
miso_pin: GPIO12
|
||||||
miso_pin: 12
|
cs_pin: GPIO15
|
||||||
|
|
||||||
mcp23s17:
|
<<: !include common.yaml
|
||||||
- id: mcp23s17_hub
|
|
||||||
cs_pin: 15
|
|
||||||
deviceaddress: 0
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp23s17
|
clk_pin: GPIO2
|
||||||
clk_pin: 2
|
mosi_pin: GPIO3
|
||||||
mosi_pin: 3
|
miso_pin: GPIO4
|
||||||
miso_pin: 4
|
cs_pin: GPIO5
|
||||||
|
|
||||||
mcp23s17:
|
<<: !include common.yaml
|
||||||
- id: mcp23s17_hub
|
|
||||||
cs_pin: 6
|
|
||||||
deviceaddress: 0
|
|
||||||
|
44
tests/components/mcp2515/common.yaml
Normal file
44
tests/components/mcp2515/common.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
spi:
|
||||||
|
- id: spi_mcp2515
|
||||||
|
clk_pin: ${clk_pin}
|
||||||
|
mosi_pin: ${mosi_pin}
|
||||||
|
miso_pin: ${miso_pin}
|
||||||
|
|
||||||
|
canbus:
|
||||||
|
- platform: mcp2515
|
||||||
|
id: mcp2515_can
|
||||||
|
cs_pin: ${cs_pin}
|
||||||
|
can_id: 4
|
||||||
|
bit_rate: 50kbps
|
||||||
|
on_frame:
|
||||||
|
- can_id: 500
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
std::string b(x.begin(), x.end());
|
||||||
|
ESP_LOGD("can_id 500", "%s", b.c_str());
|
||||||
|
- can_id: 23
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: "return x[0] == 0x11;"
|
||||||
|
then:
|
||||||
|
logger.log: "x[0] == 0x11"
|
||||||
|
- can_id: 0b00000000000000000000001000000
|
||||||
|
can_id_mask: 0b11111000000000011111111000000
|
||||||
|
use_extended_id: true
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
auto pdo_id = can_id >> 14;
|
||||||
|
switch (pdo_id)
|
||||||
|
{
|
||||||
|
case 117:
|
||||||
|
ESP_LOGD("canbus", "exhaust_fan_duty");
|
||||||
|
break;
|
||||||
|
case 118:
|
||||||
|
ESP_LOGD("canbus", "supply_fan_duty");
|
||||||
|
break;
|
||||||
|
case 119:
|
||||||
|
ESP_LOGD("canbus", "supply_fan_flow");
|
||||||
|
break;
|
||||||
|
// to be continued...
|
||||||
|
}
|
@ -1,44 +1,7 @@
|
|||||||
spi:
|
substitutions:
|
||||||
- id: spi_mcp2515
|
clk_pin: GPIO16
|
||||||
clk_pin: 16
|
mosi_pin: GPIO17
|
||||||
mosi_pin: 17
|
miso_pin: GPIO15
|
||||||
miso_pin: 15
|
cs_pin: GPIO5
|
||||||
|
|
||||||
canbus:
|
<<: !include common.yaml
|
||||||
- platform: mcp2515
|
|
||||||
id: mcp2515_can
|
|
||||||
cs_pin: 12
|
|
||||||
can_id: 4
|
|
||||||
bit_rate: 50kbps
|
|
||||||
on_frame:
|
|
||||||
- can_id: 500
|
|
||||||
then:
|
|
||||||
- lambda: |-
|
|
||||||
std::string b(x.begin(), x.end());
|
|
||||||
ESP_LOGD("can_id 500", "%s", b.c_str());
|
|
||||||
- can_id: 23
|
|
||||||
then:
|
|
||||||
- if:
|
|
||||||
condition:
|
|
||||||
lambda: "return x[0] == 0x11;"
|
|
||||||
then:
|
|
||||||
logger.log: "x[0] == 0x11"
|
|
||||||
- can_id: 0b00000000000000000000001000000
|
|
||||||
can_id_mask: 0b11111000000000011111111000000
|
|
||||||
use_extended_id: true
|
|
||||||
then:
|
|
||||||
- lambda: |-
|
|
||||||
auto pdo_id = can_id >> 14;
|
|
||||||
switch (pdo_id)
|
|
||||||
{
|
|
||||||
case 117:
|
|
||||||
ESP_LOGD("canbus", "exhaust_fan_duty");
|
|
||||||
break;
|
|
||||||
case 118:
|
|
||||||
ESP_LOGD("canbus", "supply_fan_duty");
|
|
||||||
break;
|
|
||||||
case 119:
|
|
||||||
ESP_LOGD("canbus", "supply_fan_flow");
|
|
||||||
break;
|
|
||||||
// to be continued...
|
|
||||||
}
|
|
||||||
|
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