Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use built-in "thermostat_mode" for HVAC mode #158

Merged
merged 5 commits into from
Sep 20, 2024
Merged

Conversation

aivus
Copy link
Owner

@aivus aivus commented Sep 19, 2024

Revert changes related to hvac_mode (added in #129) and use capability options for built-in thermostat_mode

@aivus aivus added this to the v0.8.x milestone Sep 19, 2024
app.json Outdated Show resolved Hide resolved
app.json Outdated Show resolved Hide resolved
@aivus aivus self-assigned this Sep 19, 2024
@aivus
Copy link
Owner Author

aivus commented Sep 19, 2024

Hey @denniedegroot

I would be happy if you could install the version from this branch and do a quick testing.
Unfortunately, I don't have access to my AC and cannot test the changes with the real device.

With this changes I'm returning back to thermostat_mode instead of hvac_mode because now we can use capability options to pass custom enum values.

Btw, this article might be interesting because Athom is going to "fix" firmware of Homey Pro 2023 and sync the behaviour with old Homey.

@denniedegroot
Copy link
Contributor

@aivus I did a quick test. Everything seems to work as intended, the only thing I noticed was that the initial on/off state was incorrect.

I noticed a bug I introduced recently, a patch is below:

diff --git a/app.js b/app.js
index 5ec5d5a..dff0216 100644
--- a/app.js
+++ b/app.js
@@ -62,7 +62,7 @@ class GreeHVAC extends Homey.App {
 
         this.homey.flow.getConditionCard('quiet_mode_is')
             .registerRunListener((args, state) => {
-                const quietMode = args.device.getCapabilityValue('quiet_mode_is');
+                const quietMode = args.device.getCapabilityValue('quiet_mode');
                 args.device.log('[condition]', '[quiet mode]', quietMode);
                 return args.mode === quietMode;
             });

@aivus
Copy link
Owner Author

aivus commented Sep 20, 2024

Thanks for the quick response @denniedegroot
I wasn't sure about the flow changes (triggers/conditions/actions) as it requires real interaction with the device I don't currently have.

I'll push the changes to the test channel today.

the only thing I noticed was that the initial on/off state was incorrect.

I was noticing this for several years already when initial state of UI for on/off is not in sync with value in the capability. I was contacting Athom several years ago and it wasn't fixed.

I noticed a bug I introduced recently, a patch is below:

Thanks. I'll apply the patch. Done in bc71637

@aivus aivus marked this pull request as ready for review September 20, 2024 17:15
@aivus aivus merged commit ff3260d into master Sep 20, 2024
6 checks passed
@aivus aivus deleted the rework-thermostat-mode branch September 20, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants