cdpuk / ha-bestway

Home Assistant integration for Bestway / Lay-Z-Spa hot tubs
MIT License
59 stars 15 forks source link

Bubbles Toggle Inconsistent #32

Closed steveconrad closed 9 months ago

steveconrad commented 11 months ago

I updated to the latest version a few days ago. I notices that the filter and bubbles objects had changed to a v2. I have the bobbles toggle on my dashboard and I've noticed that the new toggle operates in an odd way. e.g. The toggle is off on my dashboard. I press the button and the bubbles come on as expected. However, the icon on the dashboard changes to 'on' then a few second later turns to off. The bubbles on the spa are still on. I then have a difference where the spa is using the bubbles, but the dashboard says they are off. I sometimes have to press the toggle a couple of times to eventually get the spa to respond and turn off the bubbles.

Turning on the bubbles on the spa's control is also not showing as ON on the dashboard. This is an issue for me especially as I'd written an automation to turn off bubbles after 10 minutes. That's not recognising the button press, so doesn't trigger the timer.

I had no issues with the previous version, but this new one is proving inconsistent.

Anyone else seeing the same?

Seaniau commented 11 months ago

This started for me about a week ago also. No updates were performed at the time, I was on v1.1.5 Updating to the latest release yesterday has not resolved the issue, neither has deleting the integration and entities and re-configuring.

steveconrad commented 11 months ago

One odd effect I've noticed - if I turn on the bubbles from my HA dashboard, then they activate and show as toggled on on the dashboard. However, when I toggle the bubbles off via the same dashboard, the FILTER icon switches off, then a second later, the bubbles also go off then immediately show as on again. Has the filter and bubbles entities got mixed up somewhere?

deosrc commented 11 months ago

I've just set up my Milan tub and noticed that the bubble state seems to be shown by the filter switch.

Steps to reproduce:

  1. Start with all features off in HA and on tub.
  2. Turn on bubbles from HA
  3. Tub bubbles turn on, HA shows on briefly.
  4. After about 1 second, bubbles toggle switches off in HA and filter toggle turns on. Tub stays in same state with bubbles on and filter off.

I'll try do some more testing of the various states and report back.

deosrc commented 11 months ago

I turned the bubbles on this morning and ran into this issue, but 15 minutes later when I checked, the toggle was showing correctly. It also now seems to be updating in real time.

I wonder if the problem was an intermittent connection between the spa and cloud causing the delay in updating the value. I believe I have seen elsewhere someone mention that the bestway app can connect and control the spa locally? That would explain though why the app shows the correct state while this integration shows the issue.

It would also explain another issue where the toggle wasn't working for control either but was a short while later.

If it happens again, I'll try disabling wifi on my phone and using the bestway app to see if that also encounters the issue.

craigmcfly commented 10 months ago

I don't know if it's related, but when I turn the tub off in HA, the filter/heat go off as expected, but when I turn it back on, it turns on the filter and the bubbles.

If I try to turn on and off the bubbles in HA, the bubbles turn off but so does the filter.

cdpuk commented 9 months ago

@craigmcfly could you clarify? You say "when I turn the tub off in HA", but I've only just added the main power switch to the code today, so what was it you were turning off/on?

craigmcfly commented 9 months ago

Okay, so I have dug into this a bit deeper. The HA template creates a master on/off toggle by default for your entire module on the dashboard, which results in inconsistent behaviour (cos the individual toggles weren't designed for that).

Once I deleted that toggle from the dashboard, all was well.

Sorry for the confusion

On Wed, 13 Sept 2023, 21:04 cdpuk, @.***> wrote:

@craigmcfly https://github.com/craigmcfly could you clarify? You say "when I turn the tub off in HA", but I've only just added the main power switch to the code today, so what was it you were turning off/on?

— Reply to this email directly, view it on GitHub https://github.com/cdpuk/ha-bestway/issues/32#issuecomment-1718244369, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4TEALYSYJOCKLUO2W7SKLX2IGUBANCNFSM6AAAAAA2L56ELU . You are receiving this because you were mentioned.Message ID: @.***>

cdpuk commented 9 months ago

Thanks. I have now found a couple of logic bugs that were probably causing the issues described above. These will be included in the next release.