fix(climate): support stateful split AC over MQTT IR blasters#1573
Open
nesvet wants to merge 1 commit into
Open
fix(climate): support stateful split AC over MQTT IR blasters#1573nesvet wants to merge 1 commit into
nesvet wants to merge 1 commit into
Conversation
Skip the separate power-on IR packet by default for MQTT controllers, with optional YAML/JSON overrides via send_on_command. Auto-format MQTT payloads for Zigbee2MQTT (raw ir_code_to_send topic vs JSON on set).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes control of stateful split AC units through MQTT IR blasters (Zigbee2MQTT: Moes UFO-R11, ZS06, etc.).
Today SmartIR always sends a separate
onIR packet before every mode/fan/temperature command. For stateful AC protocols the state packet already encodes power + mode + fan + setpoint. Sendingonfirst causes many MQTT blasters to ignore the follow-up command or apply the wrong state.This PR:
oncommand by default for MQTT controllers, while keeping the previous behaviour for Broadlink, Xiaomi, LOOK.in, and ESPHome.send_on_commandYAML option (and optional per-device JSON fieldsendOnCommand) so users with hardware that still needs a dedicated power-on packet can opt back in.ir_code_to_send→ raw code stringsettopic →{"ir_code_to_send":"<code>"}docs/CLIMATE.md.Motivation / related issues
mqtt.publishworks, SmartIR does not (separateon+ wrong payload format)Behaviour change
on+ stateon+ stateBackward compatibility: set
send_on_command: truein YAML or"sendOnCommand": truein the device JSON.Test plan
zigbee2mqtt/<device>/set/ir_code_to_send:climate.set_hvac_mode→climate.set_fan_mode→climate.set_temperaturecontrols AC without a prioronpacketzigbee2mqtt/<device>/set: payload is valid JSON withir_code_to_sendsend_on_command: truerestores legacyon+ state sequence on MQTTonbefore state commands (default unchanged)climate.turn_offstill sends only theoffcommandsend_on_commandreflects resolved settingExample configuration
Device JSON fields used with MQTT blasters:
{ "supportedController": "MQTT", "commandsEncoding": "Raw" }