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

Not sending "off" and "on" command if those are same and device is already in the required assumed state #70

Closed
klimofey opened this issue Jul 9, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request fix in testing fix was provided in branch or beta and requires user testing

Comments

@klimofey
Copy link

klimofey commented Jul 9, 2024

Problem
In my AC commands for turning "on" and "off" are same, so when I change the state of AC (temperature for example) - "ON + HVAC + TEMPERATURE" turns my AC off, if AC is on now and turning on if AC is off now.

Solution
If ON and OFF commands in json are same, don't send those command if power state is not changing.
If need to turn on from off current state - send command for turning on and after 5 sec send command for changing HVAC + temperature
If need to turn off - just turn off
if need change state without changing power state - not send all commands

Describe alternatives you've considered
Add possibility to use in temperature field values: string like common IR code and object at the same time
{ "on": "dkawmdlkwamdlkawmdlawdlmaw", "regular": "wadmpp9iunjonj" }

Additional context
My AC - Electra RC3 IR remote

@klimofey klimofey added the enhancement New feature or request label Jul 9, 2024
@klimofey klimofey mentioned this issue Jul 9, 2024
@javierugarte
Copy link

Hello! I have the same problem and I'm surprised that there aren't more people experiencing it. Usually, the on/off button is the same.

If you want, I can also support you with any necessary tests.

Best regards,

@litinoveweedle
Copy link
Owner

Well this is actually not very common for HVAC units.the physical IR controller have very often one button, but it actually cycles between two different commands, where the on one is actually sends comple state of the device. But anyway I am planning to add this into ongoing release...

@litinoveweedle
Copy link
Owner

Hello, initial implementation is in this branch. You can install latest beta using HACS and then replace only climate.py from the branch above.

Please test it and report back. If any issues are found please attach debug log.

@litinoveweedle litinoveweedle added the fix in testing fix was provided in branch or beta and requires user testing label Jul 19, 2024
@javierugarte
Copy link

It works perfectly! All the tests I have done work well.

The only thing is, when I applied the beta version, I got an error saying that the property "temperatureUnit" does not exist in my custom_codes file. Could a default value be set to prevent failures for people who already have custom_codes created? Although the error message is descriptive, I'm not sure if the average user will read it.

Best regards and thanks! I will be looking forward to the final version.

@litinoveweedle
Copy link
Owner

Hello, thank you for testing. I am glad it worked as expected.

Regarding the default value for the Temperature Unit, There are many syntax checks added, so I kind of expect a lot of problems from users not reading the docs. I moved all the syntax checks from the climate.py into dedicated shared class, so now it raise error even before it reaches climate and failover default could be set. I fixed all (well most) of the shipped codes. So if the user was bright enough to create own device files, hopefully he will be able to find the error. But I will probably do some "breaking changes' stuff on the pages...

Anyway branch was merged with the master and I will probably release one more beta before new version release. I would appreciate you to retest it and point to other potential breaking changes ;-)

@litinoveweedle
Copy link
Owner

The fix was release in the latest beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix in testing fix was provided in branch or beta and requires user testing
Projects
None yet
Development

No branches or pull requests

3 participants