From fca0c61cacea05c70608bcd0c7e2779e68392c63 Mon Sep 17 00:00:00 2001 From: jbouwh Date: Thu, 29 Dec 2022 15:52:08 +0000 Subject: [PATCH 1/2] Add optimistic config optopn for MQTT climate --- source/_integrations/climate.mqtt.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/_integrations/climate.mqtt.markdown b/source/_integrations/climate.mqtt.markdown index 6678eaef9e22..ae3313f4432e 100644 --- a/source/_integrations/climate.mqtt.markdown +++ b/source/_integrations/climate.mqtt.markdown @@ -227,6 +227,11 @@ object_id: description: Used instead of `name` for automatic generation of `entity_id` required: false type: string +optimistic: + description: Flag that defines if the climate works in optimistic mode + required: false + type: boolean + default: "`true` if no state topic defined, else `false`." payload_available: description: The payload that represents the available state. required: false @@ -377,7 +382,8 @@ value_template: ## Optimistic mode -If a property works in *optimistic mode* (when the corresponding state topic is not set), Home Assistant will assume that any state changes published to the command topics did work and change the internal state of the entity immediately after publishing to the command topic. If it does not work in optimistic mode, the internal state of the entity is only updated when the requested update is confirmed by the device through the state topic. +If a property works in *optimistic mode* (when the corresponding state topic is not set), Home Assistant will assume that any state changes published to the command topics did work and change the internal state of the entity immediately after publishing to the command topic. If it does not work in optimistic mode, the internal state of the entity is only updated when the requested update is confirmed by the device through the state topic. You can enforce optimistic mode by setting the `optimistic` +option to `true`. When set the internal state will always be updated, even when a state topic is defined. ## Using Templates From 6bc4a2613a1f6bbc3bd92927c87896d968b60962 Mon Sep 17 00:00:00 2001 From: jbouwh Date: Thu, 29 Dec 2022 15:57:35 +0000 Subject: [PATCH 2/2] Add a comma for readability --- source/_integrations/climate.mqtt.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/_integrations/climate.mqtt.markdown b/source/_integrations/climate.mqtt.markdown index ae3313f4432e..b5fa0e3a1a6d 100644 --- a/source/_integrations/climate.mqtt.markdown +++ b/source/_integrations/climate.mqtt.markdown @@ -382,8 +382,7 @@ value_template: ## Optimistic mode -If a property works in *optimistic mode* (when the corresponding state topic is not set), Home Assistant will assume that any state changes published to the command topics did work and change the internal state of the entity immediately after publishing to the command topic. If it does not work in optimistic mode, the internal state of the entity is only updated when the requested update is confirmed by the device through the state topic. You can enforce optimistic mode by setting the `optimistic` -option to `true`. When set the internal state will always be updated, even when a state topic is defined. +If a property works in *optimistic mode* (when the corresponding state topic is not set), Home Assistant will assume that any state changes published to the command topics did work and change the internal state of the entity immediately after publishing to the command topic. If it does not work in optimistic mode, the internal state of the entity is only updated when the requested update is confirmed by the device through the state topic. You can enforce optimistic mode by setting the `optimistic` option to `true`. When set, the internal state will always be updated, even when a state topic is defined. ## Using Templates