8000 Correct current temperature for tuya thermostats by SaSa1983 · Pull Request #66715 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Correct current temperature for tuya thermostats #66715

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

Merged
merged 11 commits into from
Feb 18, 2022
Merged

Conversation

SaSa1983
Copy link
Contributor
@SaSa1983 SaSa1983 commented Feb 17, 2022

Breaking change

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @tuya, @zlinoliver, @METISU, @frenck, mind taking a look at this pull request as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

SaSa1983 and others added 3 commits February 17, 2022 11:18
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
@frenck
Copy link
Member
frenck commented Feb 18, 2022

I've tested this again 8000 st some other devices and it seems like this will break them:

CleanShot 2022-02-18 at 11 46 10@2x

      "temp_current": {
        "type": "Integer",
        "value": {
          "unit": "\u2103",
          "min": -9,
          "max": 99,
          "scale": 0,
          "step": 1
        }
      },

So, somehow, I'm kinda thinking that we are missing something.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
@SaSa1983
Copy link
Contributor Author
SaSa1983 commented Feb 18, 2022

Mi "upper_temp" field looks like:

"upper_temp": {
            "type": "Integer",
            "value": {
              "unit": "\u2103",
              "min": 0,
              "max": 100,
              "scale": 0,
              "step": 5
            }
          }

The difference in this case ist step.
May be we need to change the if clause to

scale == 0 and step != 1

or maybe this only applies to "upper_temp"?

@SaSa1983
Copy link
Contributor Author
SaSa1983 commented Feb 18, 2022

id suggest we'll use and step!=1 as part of the if clause rather than binding it to the dpcode

8000
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
@SaSa1983
Copy link
Contributor Author

I submitted a patch changing the if clause as suggested.

Thus the division by 10 is only performed if scale == 0 and step != 1

@SaSa1983
Copy link
Contributor Author

@frenck Please be so kind to try again if the current version now shows the correct value for your thermostat

@frenck
Copy link
Member
frenck commented Feb 18, 2022

@SaSa1983 Yeah I know it will for all test equipment I have.
But it is slightly worrying.

Let's merge this and try this during beta to see how it pans out for others 👍

@frenck frenck merged commit 9389d1e into home-assistant:dev Feb 18, 2022
@frenck frenck added this to the 2022.2.9 milestone Feb 18, 2022
balloob pushed a commit that referenced this pull request Feb 18, 2022
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
@balloob balloob mentioned this pull request Feb 18, 2022
@LPK60
Copy link
LPK60 commented Feb 19, 2022

@frenck Many thanks for the quick fixing. Now finally I can work on an climate automation.

@maxkrok
Copy link
maxkrok commented Feb 19, 2022

The same problem is with "target temperature" after 2.8 update. 2.9 update does not help. Instead of 20 degrees it shows 100 degrees. So it is multiplied by 5. Please help.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect current temperature reported for MoesGO thermostat
6 participants
0