j5lien / esphome-idasen-desk-controller

ESPHome component for Ikea Idasen desk control
MIT License
188 stars 36 forks source link

Add 0.0 counter limit #18

Closed noxhirsch closed 2 years ago

noxhirsch commented 3 years ago

To solve the problem of https://github.com/j5lien/esphome-idasen-desk-controller/issues/17, I created a 0.0 speed counter to stop the table after 5x 0.0 speed in a row. I'm not a C++ developer (or any developer at all in any language), so this might not be the best or cleanest solution, but at least it works 😃 I only opened that PR to give you an idea what my solution would look like - feel free to close or edit it. Side note: I increased the limit to 5 (instead of 2 as proposed in the issue), because I had often counted ~3x 0.0 speed in a row with normal movements - it still stops the 0.0 loop very fast.

hoborm commented 2 years ago

I just referenced your version into my home assistant configuration and could confirm, that it fixed the issue for me. Which was I believe same as yours, without your custom service. It was stuck on speed 0.0 for me as well.

angadsingh commented 2 years ago

this should get merged

j5lien commented 2 years ago

I'll merge this PR in the 1.2 version (I had to recreate the PR to fix conflict https://github.com/j5lien/esphome-idasen-desk-controller/pull/32)