Lay-Z-Spa Hot Tub wi-fi pump automation

Nice work !

@cdpuk great effort. Not sure if you want to pop something into the readme to mention the integration does not work for spas connected by the Lay z spa app? Wording makes it seem like both Bestway and Lay z spa work; I just installed the integration but it won’t let me log in as my Paris is connected via Lay Z Spa

If you wanted to use it. You could relink it to the Bestway app.
Once you do though. You can’t go back.

@BruceH5200 Does the Bestway app have the same control as the lay z spa? ie, can you schedule, etc? Im happy to make the switch as long as the app functionality is similar features to lay z spa (I still use the lay z spa app every now and then just to make sure everything is working correctly - primarily I use HA and followed your guide here and on your GitHub pages and appreciate you havent had one of these spas for a while due to hardshell spa).
On a side note, have you found the hard shell using more electric than when you have the lay z spa? I used to have a large 8 seater hardshell in my old house when the world was a difference place for electric prices (lol 12p odd per unit electric rather than the mortgage prices per unit of today)

Good point. I originally tried the Lay-Z-Spa app (as per the instructions) but while I could get the Spa on the Wi-Fi, the app hit some sort of error after that. Other reviewers of the Android app found the same thing, and helpfully pointed me to the Bestway app, which worked flawlessly. I will add a note to the README.

Here’s some screenshots of the Bestway app - hopefully you can compare features with these.


Still early days for this spa, but it seems to need about 4-6kWh per day to keep it at 35 degrees. That’s with a foam base, some extra foil bubble wrap stuff under the lid and a CleverSpa insulated cover. HA is automating the use of excess PV energy to do this. For that reason I’ve not yet added scheduling to the integration as HA can do a better job!

1 Like

@cdpuk thanks. I will compare screens.

On a side note, just in case your interested, it sounds like you could do with much better insulation. I keep my spa at 38° and only loose about 1° a day. I have the spa on 100mm PIR insulation boards to cut down on heat loss from below. Most people go with Kingspan or Celotex but they are more expensive as they are well known. Got my boards from Travis Perkins about a month ago for £110 (Kingspan and Celotex are about £160 for the exact same stuff).
Also sounds like your side covers and lid cover need upgrading. I bought both from these guys:

Can whole heartedly recommend them. The covers are a bit expensive but the have the lowest thermal u values and really keep the heat in. They pay for theirself within a couple of months what with the price of electric although it might take a bit longer for you with your free electric from PV?. I appear to be using about 1 to 2kwh a day but being as I’m on Octopus Go I only heat at night between 12:30am and 4:30am at a cost of about 10p per day (I’m also using the automation for filter to run 5 minutes every 30 minutes)


3 Likes

Hi.

I can now find the bestway integration. But everytime I try to login I got a error message that tells me the account is not valid. Tips?

Thanks you very much, works like a charm on mine

Which one did you go for?

Got a hard shell tub,
Platinum spas.
It’s a whole different thing.
We use it several times a week still !

Linked into home assistant of course.

1 Like

Hi, i would love to get this working, but got the same error as @LasseTheDude . Invalid account. I live in Norway. Is there any country specific setting?
@cdpuk anything i can do to make this work? I cant see anything relevant in the log.
Thanks

Can you show the code for this one? Very nice!

Here’s the yaml code:

"type": "conditional",

"conditions": [

    {

        "entity": "binary_sensor.hottub_online",

        "state": "on"

    }

],

"card": {

    "type": "vertical-stack",

    "title": "Lay-Z Spa Havana",

    "cards": [

        {

            "type": "grid",

            "cards": [

                {

                    "type": "button",

                    "tap_action": {

                        "action": "call-service",

                        "service": "switch.toggle",

                        "service_data": {},

                        "target": {

                            "entity_id": "switch.hottub_power"

                        }

                    },

                    "entity": "binary_sensor.hottub_power",

                    "name": "Power"

                },

                {

                    "type": "button",

                    "tap_action": {

                        "action": "more-info"

                    },

                    "entity": "binary_sensor.hottub_online",

                    "name": "Online"

                },

                {

                    "type": "button",

                    "tap_action": {

                        "action": "call-service",

                        "service": "switch.toggle",

                        "service_data": {},

                        "target": {

                            "entity_id": "switch.hottub_heat"

                        }

                    },

                    "entity": "binary_sensor.hottub_heat",

                    "name": "Heater",

                    "show_state": false

                },

                {

                    "type": "button",

                    "tap_action": {

                        "action": "call-service",

                        "service": "switch.toggle",

                        "service_data": {},

                        "target": {

                            "entity_id": "switch.hottub_filter"

                        }

                    },

                    "entity": "binary_sensor.hottub_filter",

                    "name": "Filter"

                },

                {

                    "type": "button",

                    "tap_action": {

                        "action": "call-service",

                        "service": "switch.toggle",

                        "service_data": {},

                        "target": {

                            "entity_id": "switch.hottub_bubbles"

                        }

                    },

                    "entity": "binary_sensor.hottub_bubble",

                    "name": "Bubbles"

                },

                {

                    "type": "button",

                    "tap_action": {

                        "action": "call-service",

                        "service": "switch.toggle",

                        "service_data": {},

                        "target": {

                            "entity_id": "switch.hottub_locked"

                        }

                    },

                    "entity": "binary_sensor.hottub_locked",

                    "name": "Locked"

                }

            ],

            "columns": 6

        },

        {

            "type": "custom:mini-graph-card",

            "name": "Watertemperatuur",

            "entities": [

                {

                    "entity": "sensor.hottub_pump_temp",

                    "name": "Watertemperatuur",

                    "color": "#0000FF"

                },

                {

                    "entity": "sensor.hottub_pump_target",

                    "name": "Doeltemperatuur",

                    "color": "#FF0000"

                }

            ],

            "show": {

                "graph": "line"

            },

            "hours_to_show": 24,

            "update_interval": 60,

            "points_per_hour": 4,

            "hour24": true,

            "line_width": 2,

            "decimals": 0

        },

        {

            "type": "entities",

            "entities": [

                {

                    "entity": "sensor.hottub_status"

                },

                {

                    "entity": "input_number.hottub_water_target",

                    "name": "Stel temperatuur in"

                },

                {

                    "entity": "sensor.hottub_pump_target",

                    "name": "Doeltemperatuur"

                },

                {

                    "entity": "sensor.hottub_summary"

                },

                {

                    "entity": "sensor.hottub_error",

                    "name": "Error"

                }

            ]

        }

    ]

}

@cdpuk I gave it a go and jumped in to moving my pump from Lay Z Spa app to BestWay (negatives of the app that I can see so far are the Lay Z Spa app will let you set up a heating schedule for each day of the week whereas Bestway app only lets you schedule start in x hours and rrun heater for x hours - definitely a step down from Lay Z Spa app as you cant set and forget - buts thats where the magic of HA can come in :slight_smile: )
I have reported an issue on GitHub - if I turn on the heater in the Bestway app, HA does not get updated to reflect. Same goes for changing temp in the app. To test, I terminated the app first, then reloaded, changed the setting in app and then came back to HA a couple of minutes later - HA showed the previous settings

I dont get the app to link to the spa, but the spa got the wifi-settings and have connected to the wifi… is there any way to access the spa without getting into the app first?

after it sends the wifi-settings to the spa, it just get an error after a while… tried many times.

That sounds a lot like the problem I had with the Lay-Z-Spa app. It would indeed go past the “sending Wi-Fi settings to pump” stage, but then couldn’t connect. My router confirmed that the pump had successfully joined the Wi-Fi. Have you tried the “Bestway Smart Hub” app instead? It worked flawlessly for me, and is required if you’re trying to get my integration working.

This is great, thanks all who contributed to this!!

Although I’ve messed with various home automation stuff over the years, I’ve not done anything too in-depth and this is my first look at-home assistant, all for this reason. Last month I bought the wifi version of the heater pump and yesterday after stumbling on this thread I got HA docker setup on my unraid server, followed the procedure and got the ha-bestway integration setup… switched app from lay-z-spa to bestway and it worked.

I’ve had an attempt at automation but not sure I’m approaching this correctly. For one I can’t see a way to change the target temperature (within automation). unsure if things are bundled together and I need to add more to have a separate temp sensor and control of the target temp? I’m guessing the idea is to do more of that control via HA to turn heat off/on based on some sort of trigger? Any tips or advice are most welcome to help wrap my head around this a bit more… ty!

I’m happy to share Node Red flows that control the spa based on target temps etc by the integration that has been created for this. I don’t use HA automations though to control it all

Changing the temperature is possible - you need to use the built-in HA service for “Climate: set temperature”. Here’s one of my automations - I use it to boost the temperature on or before non-working days (when it’s more likely to be used), and set a slightly lower temperature for eco reasons the rest of the time. It also uses the lower temperature if we’re not at home.

alias: 🛁 Lay-Z-Spa - Update target temperature
description: ''
trigger:
  - platform: time
    at: '06:00:00'
condition:
  - type: is_connected
    condition: device
    device_id: 28c1f66728851f6f4fd50e03c408e269
    entity_id: binary_sensor.spa_connected
    domain: binary_sensor
action:
  - service: climate.set_temperature
    data:
      temperature: >
        {% if (is_state('binary_sensor.workday', 'on') and
        is_state('binary_sensor.workday_tomorrow', 'on')) or
        is_state('group.people', 'not_home') -%} 
          32
        {%- else -%}
          35
        {%- endif %}
    target:
      entity_id: climate.spa_thermostat
mode: single

Here’s a simpler example of an action using the GUI editor (without the more complex logic):

2 Likes

Ah great, actions > action-type: ‘call service’ presenting to me the option to select ‘climate: set temperature’ looks exactly what I’m after. I’ll give it a play today.

Thankyou!!!

EDIT: Looks to be working perfectly :slight_smile: