Hello everyone!
I have mqtt air conditioning controller, that have separate topics for operation mode (cool, heat, fan, dry) and power (on, off).
But in Home Assistant “off” is one of modes.
Is there any decision to write MQTT HVAC configuration for my case natively without intermediate mqtt topics and automations reading from and publishing to different topics?
MQTT topics:
For Operation Mode state and command can be:
- 0 - Cool Mode
- 1 - Heat Mode
- 2 - Auto Mode
- 3 - Dry Mode
- 4 - Fan Mode
For Fan Speed:
- 0 - Low
- 1 - Medium
- 2 - High
- 3 - Auto
For Power:
- 0 - Off
- 1 - On
My current config:
mqtt:
climate:
- name: Thermostat - Office
object_id: thermostat_office
unique_id: thermostat_office
current_temperature_topic: "ac_office/Room Temperature (L1.100)"
modes:
- "cool"
- "heat"
- "fan_only"
- "dry"
- "auto"
mode_state_topic: "ac_office/Operation Mode (L1.100)"
mode_state_template: >
{{ ['cool', 'heat', 'auto', 'dry', 'fan_only'][value | int] }}
mode_command_topic: "ac_office/Operation Mode (L1.100)/control"
mode_command_template: >
{{ {'cool': 0, 'heat': 1, 'auto': 2, 'dry': 3, 'fan_only': 4}[value] }}
temperature_state_topic: "ac_office/Set Temperature (L1.100)"
temperature_command_topic: "ac_office/Set Temperature (L1.100)/control"
fan_mode_state_topic: "ac_office/Fan Speed (L1.100)"
fan_mode_state_template: >
{{ ['low', 'medium', 'high', 'auto'][value | int] }}
fan_mode_command_topic: "ac_office/Fan Speed (L1.100)/control"
fan_mode_command_template: >
{{ {'low': 0, 'medium': 1, 'high': 2, 'auto': 3}[value] }}
fan_modes:
- "auto"
- "low"
- "medium"
- "high"
temp_step: 1
precision: 0.1
min_temp: 16
max_temp: 30
optimistic: false
retain: true
But with such config I can’t turn it off.
power_command_topic
doesn’t work because AC should report it’s “off” state to mode_state_topic
, but it doesn’t, obviously.
Thanks for any advice!