From e4628689b26cd61ce9489d572df08a9b823a3c74 Mon Sep 17 00:00:00 2001 From: j0ta29 Date: Mon, 22 Jul 2024 12:32:16 +0000 Subject: [PATCH] added tests in new test directory structure --- tests/components/optolink/common.yaml | 70 +++++++++++++++++++ tests/components/optolink/test.esp32-ard.yaml | 7 ++ .../components/optolink/test.esp8266-ard.yaml | 5 ++ 3 files changed, 82 insertions(+) create mode 100644 tests/components/optolink/common.yaml create mode 100644 tests/components/optolink/test.esp32-ard.yaml create mode 100644 tests/components/optolink/test.esp8266-ard.yaml diff --git a/tests/components/optolink/common.yaml b/tests/components/optolink/common.yaml new file mode 100644 index 0000000000..d04cdd2be1 --- /dev/null +++ b/tests/components/optolink/common.yaml @@ -0,0 +1,70 @@ +binary_sensor: + - platform: optolink + name: Sammelstörung + address: 0x0A82 + +sensor: + - platform: optolink + name: Rücklauftemperatur + address: 0x0808 + bytes: 2 + div_ratio: 10 + unit_of_measurement: °C + icon: mdi:thermometer-chevron-down + device_class: temperature + update_interval: 120s + +text_sensor: + - platform: optolink + type: DEVICE_INFO + name: Gerätekennung + update_interval: 600s + - platform: optolink + type: STATE_INFO + name: Gerätestatus + update_interval: 15s + - platform: optolink + name: NRF_Sachnummer + address: 0x08E0 + bytes: 7 + type: RAW + update_interval: 1800s + +text: + - platform: optolink + name: Heizzeiten Montag + address: 0x2000 + bytes: 56 + type: DAY_SCHEDULE + day_of_week: MONDAY + update_interval: 60s + icon: mdi:heating-coil + +number: + - platform: optolink + name: Neigung Heizkennlinie + address: 0x27d3 + bytes: 1 + min_value: 0.2 + max_value: 3.5 + step: 0.1 + div_ratio: 10 + mode: box + icon: mdi:angle-acute + device_class: temperature + +select: + - platform: optolink + name: Betriebsart + address: 0x2323 + bytes: 1 + map: + - "0 -> Aus" + - "1 -> Nur Warmwasser" + - "2 -> Heizung und Warmwasser" + +switch: + - platform: optolink + name: Partybetrieb + address: 0x2303 + icon: mdi:party-popper diff --git a/tests/components/optolink/test.esp32-ard.yaml b/tests/components/optolink/test.esp32-ard.yaml new file mode 100644 index 0000000000..39fc3741c2 --- /dev/null +++ b/tests/components/optolink/test.esp32-ard.yaml @@ -0,0 +1,7 @@ +optolink: + protocol: P300 + rx_pin: GPIO3 + tx_pin: GPIO1 + logger: true + +<<: !include common.yaml diff --git a/tests/components/optolink/test.esp8266-ard.yaml b/tests/components/optolink/test.esp8266-ard.yaml new file mode 100644 index 0000000000..911d42974f --- /dev/null +++ b/tests/components/optolink/test.esp8266-ard.yaml @@ -0,0 +1,5 @@ +optolink: + protocol: P300 + logger: true + +<<: !include common.yaml