mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 11:30:46 +02:00
[haier] climate ID auto generation (#6949)
This commit is contained in:
@@ -183,7 +183,6 @@ BASE_CONFIG_SCHEMA = (
|
||||
cv.Optional(
|
||||
CONF_SUPPORTED_SWING_MODES,
|
||||
default=[
|
||||
"OFF",
|
||||
"VERTICAL",
|
||||
"HORIZONTAL",
|
||||
"BOTH",
|
||||
@@ -211,7 +210,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
): cv.boolean,
|
||||
cv.Optional(
|
||||
CONF_SUPPORTED_PRESETS,
|
||||
default=list(["BOOST", "COMFORT"]), # No AWAY by default
|
||||
default=["BOOST", "COMFORT"], # No AWAY by default
|
||||
): cv.ensure_list(
|
||||
cv.enum(SUPPORTED_CLIMATE_PRESETS_SMARTAIR2_OPTIONS, upper=True)
|
||||
),
|
||||
@@ -231,7 +230,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
): cv.int_range(min=PROTOCOL_CONTROL_PACKET_SIZE, max=50),
|
||||
cv.Optional(
|
||||
CONF_SUPPORTED_PRESETS,
|
||||
default=list(["BOOST", "ECO", "SLEEP"]), # No AWAY by default
|
||||
default=["BOOST", "ECO", "SLEEP"], # No AWAY by default
|
||||
): cv.ensure_list(
|
||||
cv.enum(SUPPORTED_CLIMATE_PRESETS_HON_OPTIONS, upper=True)
|
||||
),
|
||||
@@ -427,11 +426,7 @@ def _final_validate(config):
|
||||
"No logger component found, logging for Haier protocol is disabled"
|
||||
)
|
||||
cg.add_build_flag("-DHAIER_LOG_LEVEL=0")
|
||||
if (
|
||||
(CONF_WIFI_SIGNAL in config)
|
||||
and (config[CONF_WIFI_SIGNAL])
|
||||
and CONF_WIFI not in full_config
|
||||
):
|
||||
if config.get(CONF_WIFI_SIGNAL) and CONF_WIFI not in full_config:
|
||||
raise cv.Invalid(
|
||||
f"No WiFi configured, if you want to use haier climate without WiFi add {CONF_WIFI_SIGNAL}: false to climate configuration"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user