mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
INA228/INA229, INA238/INA239, INA237 power/energy/charge monitor (I2C, SPI) (#6138)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
21
tests/components/ina2xx_spi/common.yaml
Normal file
21
tests/components/ina2xx_spi/common.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
spi:
|
||||
- id: spi_ina2xx
|
||||
clk_pin: ${clk_pin}
|
||||
mosi_pin: ${mosi_pin}
|
||||
miso_pin: ${miso_pin}
|
||||
|
||||
sensor:
|
||||
- platform: ina2xx_spi
|
||||
spi_id: spi_ina2xx
|
||||
cs_pin: ${cs_pin}
|
||||
model: INA229
|
||||
shunt_resistance: 0.001130 ohm
|
||||
max_current: 40 A
|
||||
adc_range: 1
|
||||
temperature_coefficient: 50
|
||||
shunt_voltage: "INA2xx Shunt Voltage"
|
||||
bus_voltage: "INA2xx Bus Voltage"
|
||||
current: "INA2xx Current"
|
||||
power: "INA2xx Power"
|
||||
energy: "INA2xx Energy"
|
||||
charge: "INA2xx Charge"
|
7
tests/components/ina2xx_spi/test.esp32-c3-idf.yaml
Normal file
7
tests/components/ina2xx_spi/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO5
|
||||
cs_pin: GPIO8
|
||||
|
||||
<<: !include common.yaml
|
7
tests/components/ina2xx_spi/test.esp32-c3.yaml
Normal file
7
tests/components/ina2xx_spi/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO5
|
||||
cs_pin: GPIO8
|
||||
|
||||
<<: !include common.yaml
|
7
tests/components/ina2xx_spi/test.esp32-idf.yaml
Normal file
7
tests/components/ina2xx_spi/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO16
|
||||
mosi_pin: GPIO17
|
||||
miso_pin: GPIO15
|
||||
cs_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
7
tests/components/ina2xx_spi/test.esp32.yaml
Normal file
7
tests/components/ina2xx_spi/test.esp32.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO16
|
||||
mosi_pin: GPIO17
|
||||
miso_pin: GPIO15
|
||||
cs_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
7
tests/components/ina2xx_spi/test.esp8266.yaml
Normal file
7
tests/components/ina2xx_spi/test.esp8266.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO14
|
||||
mosi_pin: GPIO13
|
||||
miso_pin: GPIO12
|
||||
cs_pin: GPIO15
|
||||
|
||||
<<: !include common.yaml
|
7
tests/components/ina2xx_spi/test.rp2040.yaml
Normal file
7
tests/components/ina2xx_spi/test.rp2040.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
clk_pin: GPIO2
|
||||
mosi_pin: GPIO3
|
||||
miso_pin: GPIO4
|
||||
cs_pin: GPIO5
|
||||
|
||||
<<: !include common.yaml
|
Reference in New Issue
Block a user