diff --git a/esphome/components/airton/climate.py b/esphome/components/airton/climate.py index 132777b6c0..927f953f9f 100644 --- a/esphome/components/airton/climate.py +++ b/esphome/components/airton/climate.py @@ -10,6 +10,7 @@ airton_ns = cg.esphome_ns.namespace("airton") AirtonClimate = airton_ns.class_("AirtonClimate", climate_ir.ClimateIR) CONF_AIRTON_ID = "airton_id" +CONF_SLEEP_MODE = "sleep_mode" CONFIG_SCHEMA = climate_ir.CLIMATE_IR_WITH_RECEIVER_SCHEMA.extend( { diff --git a/esphome/components/airton/switch/__init__.py b/esphome/components/airton/switch/__init__.py index a9b7e053a3..16402072bc 100644 --- a/esphome/components/airton/switch/__init__.py +++ b/esphome/components/airton/switch/__init__.py @@ -3,12 +3,10 @@ from esphome.components import switch import esphome.config_validation as cv from esphome.const import CONF_DISPLAY, ENTITY_CATEGORY_CONFIG -from ..climate import CONF_AIRTON_ID, AirtonClimate, airton_ns +from ..climate import CONF_AIRTON_ID, CONF_SLEEP_MODE, AirtonClimate, airton_ns CODEOWNERS = ["@procsiab"] -CONF_SLEEP_MODE = "sleep" - SleepSwitch = airton_ns.class_("SleepSwitch", switch.Switch) DisplaySwitch = airton_ns.class_("DisplaySwitch", switch.Switch) diff --git a/tests/components/airton/test.esp32-ard.yaml b/tests/components/airton/test.esp32-ard.yaml index 26abc96c83..86d5c3f6d8 100644 --- a/tests/components/airton/test.esp32-ard.yaml +++ b/tests/components/airton/test.esp32-ard.yaml @@ -26,7 +26,7 @@ sensor: switch: - platform: airton - sleep: + sleep_mode: name: "sleep mode" display: name: "display light" diff --git a/tests/components/airton/test.esp32-c3-ard.yaml b/tests/components/airton/test.esp32-c3-ard.yaml index 26abc96c83..86d5c3f6d8 100644 --- a/tests/components/airton/test.esp32-c3-ard.yaml +++ b/tests/components/airton/test.esp32-c3-ard.yaml @@ -26,7 +26,7 @@ sensor: switch: - platform: airton - sleep: + sleep_mode: name: "sleep mode" display: name: "display light" diff --git a/tests/components/airton/test.esp32-c3-idf.yaml b/tests/components/airton/test.esp32-c3-idf.yaml index 26abc96c83..86d5c3f6d8 100644 --- a/tests/components/airton/test.esp32-c3-idf.yaml +++ b/tests/components/airton/test.esp32-c3-idf.yaml @@ -26,7 +26,7 @@ sensor: switch: - platform: airton - sleep: + sleep_mode: name: "sleep mode" display: name: "display light" diff --git a/tests/components/airton/test.esp32-idf.yaml b/tests/components/airton/test.esp32-idf.yaml index 26abc96c83..86d5c3f6d8 100644 --- a/tests/components/airton/test.esp32-idf.yaml +++ b/tests/components/airton/test.esp32-idf.yaml @@ -26,7 +26,7 @@ sensor: switch: - platform: airton - sleep: + sleep_mode: name: "sleep mode" display: name: "display light" diff --git a/tests/components/airton/test.esp8266-ard.yaml b/tests/components/airton/test.esp8266-ard.yaml index 26abc96c83..86d5c3f6d8 100644 --- a/tests/components/airton/test.esp8266-ard.yaml +++ b/tests/components/airton/test.esp8266-ard.yaml @@ -26,7 +26,7 @@ sensor: switch: - platform: airton - sleep: + sleep_mode: name: "sleep mode" display: name: "display light"