fjhorrillo / homebridge-airzone-cloud

Homebridge Airzone Cloud
Apache License 2.0
21 stars 3 forks source link

check to first make sure the temp name exists in the device status #31

Closed mtmcgrew closed 1 year ago

mtmcgrew commented 1 year ago

When in vent mode the target temp name is "setpoint_air_vent", however that does not exist in the device.status. This checks to make sure it's in device.status before trying to get it. If we don't do this we will throw an error

fjhorrillo commented 1 year ago

Hi, the getTargetTemperature function is used by homekit to get the target temperature, in the case of AirZone Cloud it is defined associated with the target mode, as I can see in your PR, if the system doesn't have this you are going to use the stop or auto-target temperature, this is better than an error, but this is the correct temperature that you are expecting?

mtmcgrew commented 1 year ago

Thanks for the background. In the case of the "fan" mode there is no target temp displayed on my Daikin thermostat or in the AirZone app. It displays the current room temperature, so I'm not sure the target temp is important in that mode. Maybe it'd be better to just grab the current room temp? "local_temp"