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

Fix unexpected target temp in fan and auto mode #36

Merged
merged 5 commits into from
Dec 8, 2022

Conversation

stu85010
Copy link
Contributor

@stu85010 stu85010 commented Dec 7, 2022

Problem

As the issue mentioned in #35, the Jci Hitachi doesn't return a target temperature for auto and fan mode in some AC device, this makes the history plot shows unexpected, huge peak for the target temperature attributes.

Fixes #35

Goal

Provide a workaround for this issue, the minimum requirement is to make the history plots could be readable.

Method

  1. Use a cached variable to store the previous target temperature
  2. Returning the cached target temperature if current target temperature is 65535 and the mode is auto or fan
    • If there's no valid target temperature before, return the minimum temperature.

Copy link
Owner

@qqaatw qqaatw left a comment

Choose a reason for hiding this comment

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

Left a few comments. Thanks for your contribution!

custom_components/jcihitachi_tw/climate.py Outdated Show resolved Hide resolved
custom_components/jcihitachi_tw/climate.py Outdated Show resolved Hide resolved
@qqaatw
Copy link
Owner

qqaatw commented Dec 7, 2022

Additionally, if you believe that this PR indeed addresses the issue mentioned on the FAQ section of the readme, you can also delete those texts.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: Li-Huai (Allan) Lin <qqaatw@gmail.com>
Copy link
Owner

@qqaatw qqaatw left a comment

Choose a reason for hiding this comment

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

LGTM

@qqaatw qqaatw merged commit c15837a into qqaatw:master Dec 8, 2022
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.

Unexpected target temp in fan and auto mode
2 participants