Open mkormendy opened 3 months ago
My guess is that this is an issue with the Nest app.
Can you find the device here: https://tools.developer.homey.app/tools/devices
And then check if the temperature capabilities (measure_temperature
and/or target_temperature
) are set to the temperature in F?
Yes both of them are set to 76°
That's not right, Homey internally should always store temperatures in Celcius, that's how the capability is defined:
Which means that the Nest app is importing the temperature but doesn't check its scale and (apparently) assumes it's Celcius. Since HomeKitty also assumes Celcius (because the capability definition says so), iOS thinks that the supplied temperature is in C and converts it to F, causing an incorrect temperature to be shown.
I can't fix this in HomeKitty.
Let me reach out to the homey nest app developers and reference this issue as an example. What's interesting is that the Homey mobile app sees the thermostat temperature for cooling as Fahrenheit as well as the local weather temperature too at the top of the app. I'm not sure if this is automatically adjusted based on iOS system settings, but I can't seem to find a preference setting for this in the mobile app either.
I'm fairly sure that the app uses your Homey's location to determine which temperature scale to use.
However, it's a bit unexpected that the Homey app shows the correct temperature, because I would think that it also, just like HomeKitty, also assumes that Celcius is used internally. Which would mean it would also convert the 76° to 169°.
What I'm just noticing though is that only the measured temperature is set incorrectly in your initial screenshot, the target temperature looks okay:
That's weird.
Yeah that is also very odd. I was on my phone earlier when I was looking at the homey devices properties page and only saw the numbers for the thermostat .. but here's a snap of the full details:
I took a look at the code of the Nest app, and it looks like it uses the ambient temperature in Celcius, as provided by the Nest API, to set measure_temperature
, which means the app is doing the right thing.
However, that doesn't explain why the developer tools is showing the temperature in Fahrenheit. It might be possible that the developer tools converts these values based on the user's locale, but I doubt it.
It could also be that the Nest API is providing an incorrect value, but I have no way of checking this.
I've asked one of the Athom developers on Slack if they can provide some clarification on what I'm seeing.
Can you check and see if this version fixes your problem?
Installed the update, and now the temperature units are the same in the Home app, albeit both now converted improperly somewhere. And I also noticed the following:
There are various issues here:
The first two points, I understand, however the last point, I'm not sure what to do about. Should I tell the Nest app devs that their custom capability makes it difficult for other apps to work with their app in Homey?
I assume that they don't use the standard thermostat_mode
capability for a reason, but you can always ask them.
There's not much you, or I, can do about this to get the device working properly in HomeKit though, at least not without resorting to something like a virtual/"advanced" device that provides a mapping between the custom capability to a regular capability: you would basically create a virtual thermostat device and set up flows that will update it when you change the actual thermostat, and also the other way around, when you change the virtual thermostat (from iOS) you update the actual thermostat.
Interesting .. I'm not exactly sure how to contact the developers of this to speak with them about it.
Contact info can usually be found on the app page in the app store.
Okay, I have found it, it is Athom BV that made it .. I submitted a request and received the automated response below:
Hi Michael,
Thanks for reaching out! Your request (124695) has been received and is being reviewed by our support staff.
Our estimated response time is 3 business days.
Expect an answer that blames HomeKitty 🫣
@mkormendy I'm still waiting for something at Athom to respond to my findings, but it's becoming more and more difficult for developers like me to get any response (many issues get reported but go unanswered, as Athom seems to prioritise new features).
Do I need to also chime in on slack and or the github post?
@mkormendy thanks for the offer, but not necessary 😊 Did you ever get a response from Athom support about this?
I did not. 😞
At least you're getting a nice dashboard 😛
I'm not sure if it's allowed to write here but on my side my Nest thermostat is always off in Homekit while it is in heating mode. If I put it on heating mode from Homekit it always returns to off mode on HomeKit, while it is in heating mode on Homey and in the Nest app.
@suqbus this is probably related to the Nest app not using the standard thermostat_mode
capability but a custom one, and HomeKitty doesn't support custom capabilities ☹️
Last winter, however, everything worked perfectly. I turned off the thermostat for the summer and it was when I turned it on this week that I realized this new problem. Maybe the Nest app made changes to this recently?
@suqbus that's very possible, I don't see any relevant changes to the thermostat code in HomeKitty that could explain this.
Looking at the Homey Pro updates changelog v12.2.0, they had some temperature fixes for an issue that could cause temperature conversion from Celsius to Fahrenheit to return an invalid value. Does that help correct our problem?
@mkormendy I got a diagnostics report from another user about this issue, and they are running v12.2.1. I'll try and see if I can force my Homey to use F as a unit so I can at least reproduce the issue.
I also bumped up my issue about this once again. It's only been almost two three months... 🤷🏼♂️
That was me, I also found this same issue with their builtin Alexa Integration. I did submit a support ticket with them for that, I'll let you know if I hear anything.
@mkormendy it looks like the SDK isn't causing this issue, I set my Homey's location to the US and my virtual thermostat device is showing the correct temperature in Fahrenheit now.
There was one small potential issue that might be causing a double conversion that I fixed, check out the new test release: https://homey.app/a/name.klep.homekitty/test/
You may have to "unpublish" your thermostat device from Homekit, and publish it again. You can do that from the configuration screen for the Homekitty app.
Unfortunately I don't think it had any effect.
Looking back at your comment here, I was wrong in assuming that the value shown on the "devices" page should have been in Celcius. I put my Homey in Fahrenheit mode and it was showing the value in F on that page, even though internally it was returning the proper value (in Celcius), so the devices page isn't showing the actual capability value, but a localised one.
I just realise that I only tested with the target temperature though, and looking back at this conversation the issue was with the measured temperature. So I'll do some more testing.
Okay, measured temperature is also working. It does look like it still expects that apps use °C under the hood, but from what I've seen the Nest app does so.
So at the moment I have no idea on what's causing this issue 😞
Can you provide a switch in the app that a user can select that will perform a re-calculation to ºF for thermostats? For one-off manual setups?
I can't do that, because I don't know what's causing the issue and if it applies to all thermostats or just a specific brand.
Let the user determine that, they can turn it on if they are seeing the issue.
In the Homey mobile app, I am seeing the temperature correctly.
I can't reproduce the problem, both the Homey app and the Home app on iOS are showing the correct temperatures. I don't have an actual Nest thermostat that I can use to test things with.
What we can try is that you make some changes to your thermostat's target temperature, then create a diagnostics report for Homekitty from the Homey app. Homekitty logs a fair amount of data, perhaps there's a clue in there.
I have a Google Nest Thermostat added to my Homey via the Google Nest application. The Google Nest device is set to Fahrenheit, and so is my HomeKit too. I have HomeKitty exposing the Nest Thermostat to HomeKit, but I'm seeing a bit of a conversion issue. For example, the current temperature is 76º F but for some reason, that's being read as a Celsius number of 76º C to which is being displayed on my HomeKit Thermostat current temperature as 1169º F.
Wondering if there's a fix for this.
See below: