glennsp / com.mill

Support for Mill WiFi heaters
GNU General Public License v3.0
5 stars 20 forks source link

Allow Homey 2.0.0 to expose a Mill heater as a triggerable device #4

Open pardeike opened 5 years ago

pardeike commented 5 years ago

I would love to sync other devices to my Mill heater in HomeKit. Right now, the only way is to create a virtual device in Homey 2.0 and keep it in sync with a flow and then use homekit to react on changes on that virtual device.

It would be nice to expose the heater (and maybe it’s measured temperature too) as properties that carry over to the homekit world.

pardeike commented 5 years ago

I have played with various settings in my local fork and found that simply adding an "onoff" property will make the new Homey 2.0.0 firmware expose this nicely to HomeKit. For good measures, I also added the "thermostat_mode" property so the mobile interface shows orange/black for when the Mill is heating or not.

I then added

this.setCapabilityValue('onoff', room.isHeating),
this.setCapabilityValue('thermostat_mode', room.isHeating ? 'heat' : 'off')

to async refreshMillService() {} and removed-added my Mill and everything works fine.

It would be nice to incorporate those changes. You already have a "mill_onoff", why not change it to "onoff" or is there any other purpose of having a non-standard property name?