From a6b51b864dd935cc7f33eece86e52db7185815f5 Mon Sep 17 00:00:00 2001 From: Arthur Revaclier Date: Fri, 3 Jun 2022 13:41:54 +0200 Subject: [PATCH 1/2] Fix MQTT_BASE_PLAFTORM_SCHEMA error Simple fix to address the breaking changes of HomeAssistant 2022.6.1 --- custom_components/tasmota_irhvac/climate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tasmota_irhvac/climate.py b/custom_components/tasmota_irhvac/climate.py index 2db081e..324eb5b 100644 --- a/custom_components/tasmota_irhvac/climate.py +++ b/custom_components/tasmota_irhvac/climate.py @@ -268,7 +268,7 @@ ) PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(MQTT_AVAILABILITY_SCHEMA.schema) -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(mqtt.MQTT_BASE_PLATFORM_SCHEMA.schema) +PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(mqtt.config.MQTT_BASE_SCHEMA.schema) IRHVAC_SERVICE_SCHEMA = vol.Schema( {vol.Required(ATTR_ENTITY_ID): cv.entity_ids}) From 94fa8d67796c9872c886010a27e0f3bee0e54c4d Mon Sep 17 00:00:00 2001 From: Naoki Sawada Date: Fri, 3 Jun 2022 21:56:12 +0900 Subject: [PATCH 2/2] Backward compatibility measures --- custom_components/tasmota_irhvac/climate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/tasmota_irhvac/climate.py b/custom_components/tasmota_irhvac/climate.py index 324eb5b..b9909a9 100644 --- a/custom_components/tasmota_irhvac/climate.py +++ b/custom_components/tasmota_irhvac/climate.py @@ -268,7 +268,10 @@ ) PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(MQTT_AVAILABILITY_SCHEMA.schema) -PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(mqtt.config.MQTT_BASE_SCHEMA.schema) +if hasattr(mqtt, 'MQTT_BASE_PLATFORM_SCHEMA'): + PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(mqtt.MQTT_BASE_PLATFORM_SCHEMA.schema) +else: + PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(mqtt.config.MQTT_BASE_SCHEMA.schema) IRHVAC_SERVICE_SCHEMA = vol.Schema( {vol.Required(ATTR_ENTITY_ID): cv.entity_ids})