From 6a8e88b1cc5c47f23c394cf01328a96f907d671b Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Sun, 6 Oct 2024 12:49:52 -0700 Subject: [PATCH] CSE7766 needs even parity (#7549) --- esphome/components/cse7766/sensor.py | 2 +- tests/components/cse7766/test.esp32-ard.yaml | 1 + tests/components/cse7766/test.esp32-c3-ard.yaml | 1 + tests/components/cse7766/test.esp32-c3-idf.yaml | 1 + tests/components/cse7766/test.esp32-idf.yaml | 1 + tests/components/cse7766/test.esp8266-ard.yaml | 1 + tests/components/cse7766/test.rp2040-ard.yaml | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/esphome/components/cse7766/sensor.py b/esphome/components/cse7766/sensor.py index ecb59c4b5f..b5b11a661e 100644 --- a/esphome/components/cse7766/sensor.py +++ b/esphome/components/cse7766/sensor.py @@ -79,7 +79,7 @@ CONFIG_SCHEMA = cv.Schema( } ).extend(uart.UART_DEVICE_SCHEMA) FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema( - "cse7766", baud_rate=4800, require_rx=True + "cse7766", baud_rate=4800, parity="EVEN", require_rx=True ) diff --git a/tests/components/cse7766/test.esp32-ard.yaml b/tests/components/cse7766/test.esp32-ard.yaml index f94cd0f7d8..5542b52824 100644 --- a/tests/components/cse7766/test.esp32-ard.yaml +++ b/tests/components/cse7766/test.esp32-ard.yaml @@ -5,6 +5,7 @@ uart: rx_pin: number: 16 baud_rate: 4800 + parity: EVEN sensor: - platform: cse7766 diff --git a/tests/components/cse7766/test.esp32-c3-ard.yaml b/tests/components/cse7766/test.esp32-c3-ard.yaml index 432cc0a80e..d27c9d4463 100644 --- a/tests/components/cse7766/test.esp32-c3-ard.yaml +++ b/tests/components/cse7766/test.esp32-c3-ard.yaml @@ -5,6 +5,7 @@ uart: rx_pin: number: 5 baud_rate: 4800 + parity: EVEN sensor: - platform: cse7766 diff --git a/tests/components/cse7766/test.esp32-c3-idf.yaml b/tests/components/cse7766/test.esp32-c3-idf.yaml index 432cc0a80e..d27c9d4463 100644 --- a/tests/components/cse7766/test.esp32-c3-idf.yaml +++ b/tests/components/cse7766/test.esp32-c3-idf.yaml @@ -5,6 +5,7 @@ uart: rx_pin: number: 5 baud_rate: 4800 + parity: EVEN sensor: - platform: cse7766 diff --git a/tests/components/cse7766/test.esp32-idf.yaml b/tests/components/cse7766/test.esp32-idf.yaml index f94cd0f7d8..5542b52824 100644 --- a/tests/components/cse7766/test.esp32-idf.yaml +++ b/tests/components/cse7766/test.esp32-idf.yaml @@ -5,6 +5,7 @@ uart: rx_pin: number: 16 baud_rate: 4800 + parity: EVEN sensor: - platform: cse7766 diff --git a/tests/components/cse7766/test.esp8266-ard.yaml b/tests/components/cse7766/test.esp8266-ard.yaml index 432cc0a80e..d27c9d4463 100644 --- a/tests/components/cse7766/test.esp8266-ard.yaml +++ b/tests/components/cse7766/test.esp8266-ard.yaml @@ -5,6 +5,7 @@ uart: rx_pin: number: 5 baud_rate: 4800 + parity: EVEN sensor: - platform: cse7766 diff --git a/tests/components/cse7766/test.rp2040-ard.yaml b/tests/components/cse7766/test.rp2040-ard.yaml index 432cc0a80e..d27c9d4463 100644 --- a/tests/components/cse7766/test.rp2040-ard.yaml +++ b/tests/components/cse7766/test.rp2040-ard.yaml @@ -5,6 +5,7 @@ uart: rx_pin: number: 5 baud_rate: 4800 + parity: EVEN sensor: - platform: cse7766