iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
401 stars 166 forks source link

Add heating capacity support for SimpleHeaterAccessory #416

Open valentindusollier opened 1 year ago

valentindusollier commented 1 year ago

The current implementation of SimpleHeater always set the characteristic CurrentHeaterCoolerState to HEATING even when the desired temperature is below the current one. In this commit, the heater is set to IDLE in this case. Moreover, some heater provides their current heating capacity. If the corresponding data point is set in the config, the characteristic CurrentHeaterCoolerState value changes between HEATING and IDLE according to the heating capacity.