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

Add setpoint command to imitate manual control of the thermostat #1046

Merged
merged 7 commits into from
Sep 28, 2021

Conversation

WolfRevo
Copy link
Contributor

This adds a manufacturer specific setpoint command which is issued if the setpoint changes (issued by Home Assistant / HA, regardless if changed by the user or automations or whatever) to imitate the reaction of the thermostat if a user manually controls the temperature by turning the wheel.

Without this change the internal PID of the thermostat does eract very slowly on temperature changes issued by HA.

Add Danfoss manufacturer command "Setpoint Command" to change behaviour of valve to instantly react on setpoint changes.
Change based on the proposal from @Adminiuga
Removed unnecessary imports/constants.
Quick fix for intendation
Added debug output for the setpoint command.
Corrections from flake8
How black should like it
@codecov-commenter
Copy link

Codecov Report

Merging #1046 (c5524c1) into dev (81ad3cc) will decrease coverage by 0.06%.
The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1046      +/-   ##
==========================================
- Coverage   81.20%   81.14%   -0.07%     
==========================================
  Files         195      195              
  Lines        5128     5138      +10     
==========================================
+ Hits         4164     4169       +5     
- Misses        964      969       +5     
Impacted Files Coverage Δ
zhaquirks/tuya/__init__.py 72.86% <ø> (ø)
zhaquirks/danfoss/thermostat.py 79.16% <28.57%> (-20.84%) ⬇️
zhaquirks/tuya/ts0601.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c2b7ec...c5524c1. Read the comment docs.

Copy link
Contributor

@Adminiuga Adminiuga left a comment

Choose a reason for hiding this comment

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

Lgtm

@dmulcahey dmulcahey merged commit b942adb into zigpy:dev Sep 28, 2021
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