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

Temperature change buggy #70

Closed
craggyh opened this issue Sep 20, 2019 · 8 comments
Closed

Temperature change buggy #70

craggyh opened this issue Sep 20, 2019 · 8 comments

Comments

@craggyh
Copy link

craggyh commented Sep 20, 2019

I'm using this card with Nest thermostats and the temperature change has always been buggy.
Sometimes it changes, sometimes not, sometimes changes then reverts back. I usually end up just going to the Nest dial in the end to change the temp.

Any idea what could be happening here?

@ercsey
Copy link

ercsey commented Sep 21, 2019

Same problem here. I'm using this card with Tado radiator thermostats with a wall mounted tablet. When I want to change the target temperature have to keep clicking very very fast to change target temperature, but even so after 4 clicking (step size 0.5) it begins to change the target temperature. Sometimes reverts back to the original temperature regardless if I keep clicking or not. Strange. Is it possible to change the waiting time before beginning the service call? Thank you.
P.S. I'm using version 0.26.0-0

@J-Pipe
Copy link

J-Pipe commented Oct 14, 2019

Same issue. Would really like this to be fixed. I can’t continue to use this as it is

@herwinvw
Copy link

Same for me as well. I'm using version 0.28.0.

@sti0
Copy link

sti0 commented Nov 8, 2019

Same here. I'm using mqtt thermostats. Seems that this card updates the temperature to fast (new temperature not actually published to the device or the temperature attribute was not updated). If you set temperature in the more-info dialog it will stay for a few seconds and than the new temperature was published to the entity. Even there is a fall-back to the previous temperature for a second but you could set the desired temperature without the reverts.

@drash1
Copy link

drash1 commented Dec 6, 2019

Hello, I get the sames issue, I recorded a video to illustrate it.
As mentionned the more-info temperature set work perfect as shown at the end of the video.

Would it be possible to implement the mechanisme of temperature change used in the more-info on your card??

963EFE2E-14C8-4F3D-9AA1-57DD7219A89F

@yevon
Copy link

yevon commented Dec 8, 2019

Same here, the problem is how temperature change is handled in code. I take a look at it and I discovered why it happens.

The code applies temperature every one second, it doesn't matter how many times you click the up or down arrows. If it takes 3 seconds to change the target temperature, it will try to update the temperature 3 times. In the meanwhile, lovelace triggers 3 refreshes of current temperature, but on every refresh you are incrementing the current temperature, not the temperature you have set.

For correting this, the debounce function must be deleted, and implement a cancel clicks pattern like described here:

https://stackoverflow.com/questions/17690193/delaying-click-event

@yevon
Copy link

yevon commented Dec 8, 2019

As a quick workaround for anybody reading this, just increment the time between updates seems to improve quite a lot the situation. I incremented this manually in the code to update the temperature every 5 seconds, so you have time enough to set the target temperature before lovelace triggers a refresh on the widget.

Hotfix:

In www/community/simple-thermostat folder, delete simple-thermostat.js.gz file, and replace simple-thermostat.js contents with the attached file. You can customize the time by replacing the 5000 by any other value. 5000=5s delay before applying new temperature.

simple-thermostat.zip

@legomind
Copy link

This bugs me as well.

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

No branches or pull requests

9 participants