From c00977df54bbb158dd66dd00d4320b55cfbcb24e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 19 Oct 2025 17:27:04 -1000 Subject: [PATCH] [climate] Add basic compile tests for climate component (#11404) --- tests/components/climate/common.yaml | 31 +++++++++++++++++++ .../components/climate/test.esp8266-ard.yaml | 1 + 2 files changed, 32 insertions(+) create mode 100644 tests/components/climate/common.yaml create mode 100644 tests/components/climate/test.esp8266-ard.yaml diff --git a/tests/components/climate/common.yaml b/tests/components/climate/common.yaml new file mode 100644 index 0000000000..ff405b68e2 --- /dev/null +++ b/tests/components/climate/common.yaml @@ -0,0 +1,31 @@ +switch: + - platform: template + id: climate_heater_switch + optimistic: true + - platform: template + id: climate_cooler_switch + optimistic: true + +sensor: + - platform: template + id: climate_temperature_sensor + lambda: |- + return 21.5; + update_interval: 60s + +climate: + - platform: bang_bang + id: climate_test_climate + name: Test Climate + sensor: climate_temperature_sensor + default_target_temperature_low: 18°C + default_target_temperature_high: 24°C + idle_action: + - switch.turn_off: climate_heater_switch + - switch.turn_off: climate_cooler_switch + cool_action: + - switch.turn_on: climate_cooler_switch + - switch.turn_off: climate_heater_switch + heat_action: + - switch.turn_on: climate_heater_switch + - switch.turn_off: climate_cooler_switch diff --git a/tests/components/climate/test.esp8266-ard.yaml b/tests/components/climate/test.esp8266-ard.yaml new file mode 100644 index 0000000000..dade44d145 --- /dev/null +++ b/tests/components/climate/test.esp8266-ard.yaml @@ -0,0 +1 @@ +<<: !include common.yaml