mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 11:07:33 +00:00
[ufm01] Add UFM-01 ultrasonic flow meter component (#16582)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7cb6cf2f2a
commit
c9095841ae
30
tests/components/ufm01/common.yaml
Normal file
30
tests/components/ufm01/common.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
ufm01:
|
||||
id: ufm01_component
|
||||
uart_id: uart_bus
|
||||
|
||||
sensor:
|
||||
- platform: ufm01
|
||||
accumulated_flow:
|
||||
id: accumulated_flow
|
||||
name: "Accumulated flow"
|
||||
flow:
|
||||
id: flow
|
||||
name: "Flow"
|
||||
temperature:
|
||||
id: temperature
|
||||
name: "Temperature"
|
||||
|
||||
binary_sensor:
|
||||
- platform: ufm01
|
||||
ufc_chip_error:
|
||||
id: ufc_chip_error
|
||||
name: "UFC chip error"
|
||||
flow_direction_wrong:
|
||||
id: flow_direction_wrong
|
||||
name: "Flow direction wrong"
|
||||
empty_tube:
|
||||
id: empty_tube
|
||||
name: "Empty tube"
|
||||
flow_rate_out_of_range:
|
||||
id: flow_rate_out_of_range
|
||||
name: "Flow rate out of range"
|
||||
4
tests/components/ufm01/test.esp32-idf.yaml
Normal file
4
tests/components/ufm01/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
uart_2400_even: !include ../../test_build_components/common/uart_2400_even/esp32-idf.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
4
tests/components/ufm01/test.esp8266-ard.yaml
Normal file
4
tests/components/ufm01/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
uart_2400_even: !include ../../test_build_components/common/uart_2400_even/esp8266-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
4
tests/components/ufm01/test.rp2040-ard.yaml
Normal file
4
tests/components/ufm01/test.rp2040-ard.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
uart_2400_even: !include ../../test_build_components/common/uart_2400_even/rp2040-ard.yaml
|
||||
|
||||
<<: !include common.yaml
|
||||
@@ -0,0 +1,12 @@
|
||||
# Common UART configuration for ESP32 IDF tests - 2400 baud, EVEN parity
|
||||
|
||||
substitutions:
|
||||
tx_pin: GPIO17
|
||||
rx_pin: GPIO16
|
||||
|
||||
uart:
|
||||
- id: uart_bus
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
baud_rate: 2400
|
||||
parity: EVEN
|
||||
@@ -0,0 +1,12 @@
|
||||
# Common UART configuration for ESP8266 Arduino tests - 2400 baud even parity
|
||||
|
||||
substitutions:
|
||||
tx_pin: GPIO4
|
||||
rx_pin: GPIO5
|
||||
|
||||
uart:
|
||||
- id: uart_bus
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
baud_rate: 2400
|
||||
parity: EVEN
|
||||
@@ -0,0 +1,12 @@
|
||||
# Common UART configuration for RP2040 Arduino tests - 2400 baud even parity
|
||||
|
||||
substitutions:
|
||||
tx_pin: GPIO0
|
||||
rx_pin: GPIO1
|
||||
|
||||
uart:
|
||||
- id: uart_bus
|
||||
tx_pin: ${tx_pin}
|
||||
rx_pin: ${rx_pin}
|
||||
baud_rate: 2400
|
||||
parity: EVEN
|
||||
Reference in New Issue
Block a user