Notice hotttub_status shows 5 hours ago. But I can click on it, and it will show an update a few minutes back. All of the individual items show correct (temp now, temp set, etc…see my pic in my last post).
The binary sensor never reads correct (HotTub Online) never shows on. I am assuming this is preventing the others from working correctly.
To keep things simple, just focused on the two pieces of code: hottub_status and HotTub online.
What am I missing or not doing correctly? Its killing me that I can figure this out.
and I get this. Notice HotTub_status says 5 hours. It always says 5 hours (greyed out back window)
But when I click it, I get the following; and it is correctly reading the details from the HotTub. I confirmed this work by changing the status of the tub on the control panel, and it reflects here.
But anything post this refuses to work.
To keep things simple…I literally only have the above code and the earlier code for HotTub_login and HotTub_bindings.
The only other code I place was the one binary sensor…
No matter what I do…it only shows as it being Off. If I create a sensor for HotTub pump temperature, It comes back as unavailable.
In an earlier post, I have a view shows this detail. At this point I’m not even trying any switches or commands…Just displaying data.
Could this be a problem with time and date formatting? Hence why something is not working? In your above code, I notice a “T” was inserted between date and time.
And away we “go”. That was it! -05:00, and now we got something working. Now to work through the rest, and make it work. Appreciate the help! I’m sure I will have a few more questions along the way.
So far I have only added and configured add-ons via the store. Now I don’t know how to properly start with the code. Where do I have to install the first part? I think the further procedure is already described very well here, I just know how to start correctly
I guess you want to know where to put the bits of code to get you API token and DID? I have done this for a Lay Z Spa.
Paste the hottub_login code into your configuration.yaml.
As the code uses !secret for hiding passwords you also need to put some information in a file called secrets.yaml. This should be in the same folder (config) as your configuration.yaml.
Add the hottub_email_password line to secrets.yaml, but change the bits for your email address and password. It needs the ones you use with the official app.
If your email is [email protected] and your password is MY_PASSWORD it would look like this
hottub_email_password: email=name%40hotmail.com&password=MY_PASSWORD
Restart HA. Add an entity card (I think). From memory the default card offered had the bits in I needed. If not look for entities with hottub. in the name.
If it works this card will give you your API token and DID. You then need to add these to your secrets.yaml as below.
hottub_api_did: did=AAaAaAAAAAAaaaaAAA9A9b&api_token=a1a1a1a1a2a2a2a2a12a1a1a1a2a2a2a2
I think there are multiple ways to integrate the rest of the code but I am also just scratching the surface of HA so I copied the way that Bruce does it and put all the code in its own folder and then told HA where they are. Seems sensible.
I added the following two lines to the end of my configuration.yaml.
Then I put all the sensors etc in a folder under a directory called packages. I cannot remember if I had to create the packages directory as well. If it doesn’t exist it, you create it in your config directory.
You also need to create the 4 Helpers mentioned in post #72. If it works you should have lots of new automations and sensors etc.
That is as far as I have got. It works for me apart from the scheduling. The automation Hottub_on_every_thirty won’t run for me. The issue seems to be with the HoursLeft variable.
My goal would be to incorporate the whole thing as a rule. for example every other day at 9 p.m. 38 ° C or Monday, Wednesday, Friday … Would something like this be “easy” to implement with Home Assistant?
You could create an automation that ran every day at 00:01.
with a choose you could say if it was Mon, Wed, Fri to turn on hot tub scheduled, otherwise turn it off.
Set the temp to 38 and that should do it.