Hi all!
I’ve found an odd edge case in homekit exposed Climate devices. In short, I have a simple convector that I control via MQTT:
climate:
- platform: mqtt
name: "Office Heater"
unique_id: 230498579187132
modes:
- "off"
- "auto"
availability_topic: "tele/office_heater/LWT"
current_temperature_topic: "stat/office_heater/CURRENTTEMP"
mode_command_topic: "cmnd/office_heater/EVENT"
# power_command_topic: "cmnd/office_heater/POWER1"
mode_state_topic: "stat/office_heater/ACTIVE"
mode_state_template: "{% if value == '0' %}off{% else %}auto{% endif %}"
payload_available: "Online"
payload_not_available: "Offline"
max_temp: 30.0
min_temp: 18.0
precision: 1.0
temp_step: 1.0
temperature_state_topic: "stat/office_heater/TARGETTEMP"
temperature_command_topic: "cmnd/office_heater/EVENT"
This work - and works fine. I’ve exposed this to homekit, and it works. However, I can’t turn the device on or off from the homekit tile directly. It’s as if the homekit integration doesn’t expose ‘on/off’ but rather ‘off/heat’. I have to click the tile, which opens details, then I click on heat.
As an example, the same convector exposed via HomeBridge/MQTTThing works properly. Any hints?
{
"type": "heaterCooler",
"name": "Heater",
"url": "http://xxxxxx:1883",
"logMqtt": false,
"topics": {
"getOnline": "tele/office_heater/LWT",
"getCurrentTemperature": "stat/office_heater/CURRENTTEMP",
"setHeatingThresholdTemperature": {
"topic": "cmnd/office_heater/TuyaSend2",
"apply": "return ‘3,’+message;"
},
"getHeatingThresholdTemperature": "stat/office_heater/TARGETTEMP",
"getActive": "stat/office_heater/POWER",
"setActive": "cmnd/office_heater/Power1"
},
"minTemperature": 18,
"maxTemperature": 30,
"accessory": "mqttthing",
"restrictHeaterCoolerState": [
1
],
"currentHeaterCoolerValues": [
"0",
"Idle",
"1"
],
"targetHeaterCoolerValues": [
"0",
"1"
]
}