This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bugfixes and new feature -- currently testing at home #40
base: master
Are you sure you want to change the base?
Bugfixes and new feature -- currently testing at home #40
Changes from 6 commits
a9a041e
9d27afb
e8c7e59
1645f85
aee8074
d847daa
055a511
036e2a0
c4270e7
304e6da
825261e
40450ac
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused -- is this necessary? My understanding was both the LG and HomeKit APIs operate in Celsius, and it's just a matter of what HomeKit/LG display on screen that differs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary? Can't say with units that display celsius. So this was my attempt to limit my changes to only Fahrenheit units, and if we find it's needed with celsius units, we can change. But somebody else would have to test that (someone who has a celsius unit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there harm in always performing the conversion? I believe both Celsius and Fahrenheit users will see these discrepancies due to rounding differences, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a potentially stale snapshot. I'd prefer we ignore the request or augment the handleSet / callback usage for this characteristic alone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but then the user can change the temperature to something the AC won't accept, and the temperature will just revert back next refresh. Which could be 10 minutes from now. I didn't think that was great either...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sort of think of it as one action -> one failure (ignored input) being better than (potentially) one action -> stale UI due to cache -> in-sync UI moments later. It's unfortunate that HomeKit doesn't support this set of modes appropriately but I think it could be more confusing to flash the user with a stale UI for this one case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. You should try disabling the "lockTemperature" flag and run the plugin to see what happens without it--it's not great. Basically you still get what you could be construed as a cached update: the temperature stays where the user set it, then snaps back to what the AC is actually at next refresh, potentially 10 minutes later. So my thinking here is that the user thinks they set the temperature to something preferable, then later realize the update didn't work. This would happen 100% of the time, whereas the cache being stale would be only when the connection between Thinq and the plugin is down, which I assumed was less than that. So TL;DR: this approach shows the correct state of the AC more often than any alternative.
I agree the real fix would be on the HomeKit side, but alas, can't find any fix there. Know anyone at Apple to ask what they would do in this case? Maybe there's something we don't know here...