newAM / idasen

Python API and CLI for the ikea IDÅSEN desk.
MIT License
119 stars 20 forks source link

Fixed not stopping when moving; Fixed interrupted moving #409

Closed sroebert closed 6 months ago

sroebert commented 6 months ago

After my PR #396 I noticed that my desk is not stopping anymore if pressing stop in Home Assistant. The moving of the desk is also sometimes interrupted. These changes fix these issues, I tested it with Home Assistant and everything seems to be working smoothly again.

I had a local implementation for my own desk which I was using before and the sleep was necessary, but it does not seem to be necessary with the Bleak Bluetooth library.

coveralls commented 6 months ago

Coverage Status

coverage: 88.736%. remained the same when pulling ce486caf929345221a16771f2b30cfcbc516ed08 on sroebert:bugfix/keep-moving-and-stop into 01c09f2b2436c2646d06fa282f313ad4d2944b89 on newAM:main.

sroebert commented 6 months ago

I will have a look at what is causing this.

sroebert commented 6 months ago

Ok, it turned out the delay was still needed when running locally, less so when running via a Bluetooth proxy on esphome. Lowering the delay actually seems to have solved the issues I have seeing. Re-adding the delay also solved the hysteresis. I think it should be good to go now.

sroebert commented 6 months ago

If you have time to test it with your desk, it would be nice to get this through, idasen-ha was already updated to downgrade to 0.11: https://github.com/home-assistant/core/issues/110958, https://github.com/abmantis/idasen-ha/pull/23