Move and fix value for sleep mode constant, update tests

This commit is contained in:
Lorenzo Prosseda 2024-11-15 00:37:48 +01:00
parent 515fccb377
commit 61a282f7d3
No known key found for this signature in database
GPG key ID: 316B7756E0101C16
7 changed files with 7 additions and 8 deletions

View file

@ -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(
{

View file

@ -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)

View file

@ -26,7 +26,7 @@ sensor:
switch:
- platform: airton
sleep:
sleep_mode:
name: "sleep mode"
display:
name: "display light"

View file

@ -26,7 +26,7 @@ sensor:
switch:
- platform: airton
sleep:
sleep_mode:
name: "sleep mode"
display:
name: "display light"

View file

@ -26,7 +26,7 @@ sensor:
switch:
- platform: airton
sleep:
sleep_mode:
name: "sleep mode"
display:
name: "display light"

View file

@ -26,7 +26,7 @@ sensor:
switch:
- platform: airton
sleep:
sleep_mode:
name: "sleep mode"
display:
name: "display light"

View file

@ -26,7 +26,7 @@ sensor:
switch:
- platform: airton
sleep:
sleep_mode:
name: "sleep mode"
display:
name: "display light"