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

Handle signed integers in handle_cmd_heartbeat() #62

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Conversation

pbock
Copy link
Contributor

@pbock pbock commented Nov 25, 2024

See issue #61, though I’ve not been able to test this as I’m not sure how integers below zero are encoded in heartbeat data and temperatures here are currently resolutely above zero.

@Arno-MA-73
Copy link

It's again bloody cold here, and my HA Toshiba integration has broken. Can I assist somehow in testing?

@hennikul
Copy link

hennikul commented Dec 4, 2024

I tried running this branch locally after having figured out what the problem was, and having tried to make my own patch. I can confirm that this patch works, and it's better than the fix I came up with.

Example debug of heartbeat that would have been wrong without the patch:
[2024-12-04 22:42:52,756] DEBUG toshiba_ac.device: [AC_83178279] AC heartbeat from AMQP: {'iTemp': 22, 'oTemp': -2, 'fcuTcTemp': 26, 'fcuTcjTemp': 127, 'fcuFanRpm': 51, 'cduTdTemp': 60, 'cduTsTemp': 0, 'cduTeTemp': 2, 'cduCompHz': 54, 'cduFanRpm': 83, 'cduPmvPulse': 113, 'cduIac': 0}

Without the patch, the oTemp would be 254.

Copy link
Owner

@KaSroka KaSroka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution! Can you please update it as suggested below?

toshiba_ac/device/__init__.py Outdated Show resolved Hide resolved
@KaSroka KaSroka closed this Dec 5, 2024
@KaSroka KaSroka reopened this Dec 5, 2024
@KaSroka KaSroka merged commit ec609f2 into KaSroka:main Dec 5, 2024
4 checks passed
@pbock
Copy link
Contributor Author

pbock commented Dec 5, 2024

Ah, yeah, I wasn’t sure what else there was in the heartbeat, thanks for fixing the fix!

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.

4 participants