Custom Wifi Heater driver (imlementing Thermostat)

Hello guys!

I own a Millheat panel heater, which supports local control via a very simple HTTP API (GitHub - Mill-International-AS/Generation_3_REST_API: Local REST API documentation). Via that API i am able to get the current ambient temperature and settings of my heater, aswell as set its temperature and operating mode.

My end goal is to make it so that i can pass this device to Homekit and it shows up as a thermostat device with only two modes ("off" and "heat"). And this is the part where i get stuck.
When i add Thermostat capability to my driver, hubitat implies that the device can heat or cool, and also has a Fan and Fan control modes.

How can i disable that? I see that there are attributes for supported modes (supportedThermostatModes and supportedThermostatFanModes) but i cant understand how can i modify those to limit the capabilities - in my heat i think that if i tell hubitat that only certain modes are supported it wont offer buttons/controls for the unsupported ones (and hopefully when it exports them to Homekit it will only export the supported ones).

How do you guys deal with such issues?

You can edit the supported modes, to only allow Heat and off. I do that with a few virtual thermostats I set up.

You should be able to just send ["heat,"off"] to setsupportedThermostatsmodes.

I virtual thermostat I set up that I only setup for heat. I used the setThermostatModes to change it .

Hmm.. are you exporting that to Homekit? I also try to set the supportedThermostatModes (although i am doing it with "sendEvent(name: "supportedThermostatModes", ...)" and it exports all modes to Homekit.

Do you mind sharing the code of your driver so i can use it as an example?

Thanks

That is just the standard Virtual thermostat from HE. I couldn't tell you how in a custom driver I just assumed the command would work for your driver. I used this method to correct supported thermostat modes in the virtual and in another driver I was using for awhile. Perhaps looking at that code can help you.

Thanks for that - i took a look at the code and the virtual thermostat driver. Unfortunately setting the supported modes doesnt seem to reflect in Homekit at all :-/
I am setting the values to only "off" and "heat", but in homekit i keep seeing cool and auto modes present. Even after removing the device from Homekit and re-adding it.

Any ideas are welcome to try...

are you exporting that thermostat to Apple Homekit? What modes is it showing for you?

No I am not doing homekit.

Also limiting the export of the optional fan would be nice.
For now im stuck with the default driver, which i modified to only execute heat commands. Not very pretty in Homekit, but at least it works with my automations.

Does anyone have any idea where can i find any documentation on what Hubitat capabilities are exported as what in homekit? That would be really helpful. Actually anything explaining in some details how does hubitat-homekit integration actually works behind the scenes will be helpful, but infortunately i cant find anything :frowning: