mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 12:43:51 +01:00
[climate] Add basic compile tests for climate component (#11404)
This commit is contained in:
31
tests/components/climate/common.yaml
Normal file
31
tests/components/climate/common.yaml
Normal file
@@ -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
|
||||||
1
tests/components/climate/test.esp8266-ard.yaml
Normal file
1
tests/components/climate/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<<: !include common.yaml
|
||||||
Reference in New Issue
Block a user