Home Assistant Automations

There's a new release of the integration out, v1.0.2.
- This one should automatically wake the car when you do anything which requires it, like unlocking doors or turning on HVAC.
- It doubles the refresh rate when your car is actually awake to get higher precision data when it counts.
- It adds several sensors including power state (whether the car is asleep or awake) and gear (drive/reverse/neutral/park)
- It adds two computed sensors, speed and efficiency (Wh/mi). These are not direct readings from the car, but computed from the change in other sensors like odometer and battery power.

I'm working on some statistics and template sensors using this data which I hope to share over the weekend:
View attachment 18357
The efficiency is averaged over 15 minute intervals and inverted to produce that mi/kWh figure. A template sensor then multiplies that mi/kWh by the current battery power to give an estimated miles remaining. No number inputs required, I should be able to just ask Siri what my remaining range is once I finish hooking this up.
nice, I don’t see 1.0.2 in HACS i liked how you did the tile, I might need to ask you about it
 
nice, I don’t see 1.0.2 in HACS i liked how you did the tile, I might need to ask you about it
Sure enough. Looking into it, thanks.
I'll post the lovelace (UI) configs once they're less broken as well.
 
nice, I don’t see 1.0.2 in HACS i liked how you did the tile, I might need to ask you about it
Can you take a screenshot of what happens when you go to HACS and hit “redownload”? It should pop up a version selector which includes v1.0.2, which it should also default to as the latest version. IMG_7257.webpIMG_7258.webp
 
Can you take a screenshot of what happens when you go to HACS and hit “redownload”? It should pop up a version selector which includes v1.0.2, which it should also default to as the latest version.View attachment 18362View attachment 18363
I just got it… I downloaded it. I don’t see the the lovelace as on the photos
 
nice, I don’t see 1.0.2 in HACS i liked how you did the tile, I might need to ask you about it
HACS only checks for updates every 48 hours. The redownload method is the way.
 
There's a new release of the integration out, v1.0.2.
- This one should automatically wake the car when you do anything which requires it, like unlocking doors or turning on HVAC.
- It doubles the refresh rate when your car is actually awake to get higher precision data when it counts.
- It adds several sensors including power state (whether the car is asleep or awake) and gear (drive/reverse/neutral/park)
- It adds two computed sensors, speed and efficiency (Wh/mi). These are not direct readings from the car, but computed from the change in other sensors like odometer and battery power.

I'm working on some statistics and template sensors using this data which I hope to share over the weekend:
View attachment 18357
The efficiency is averaged over 15 minute intervals and inverted to produce that mi/kWh figure. A template sensor then multiplies that mi/kWh by the current battery power to give an estimated miles remaining. No number inputs required, I should be able to just ask Siri what my remaining range is once I finish hooking this up.
Just as an FYI because of the polling mechanism, you may want to consider a polling throttle so individuals dont accidentally drain the 12v battery — which is a reason Ford revoked certain 3rd parties from accessing our APIs.
 
Just as an FYI because of the polling mechanism, you may want to consider a polling throttle so individuals dont accidentally drain the 12v battery — which is a reason Ford revoked certain 3rd parties from accessing our APIs.
As far as I can tell we're not triggering any quicker polling of the actual car. I think the car is constantly pushing out data, we're just picking it up from the "cloud." I'll take a closer look at the car's traffic to verify though.
 
As far as I can tell we're not triggering any quicker polling of the actual car. I think the car is constantly pushing out data, we're just picking it up from the "cloud." I'll take a closer look at the car's traffic to verify though.
Usually when you hit the cloud, the cloud will send something (like an SMS Message) to the vehicle if the vehicle is not actively connected to wake it up. This is where the 12v starts coming into play.
 
Usually when you hit the cloud, the cloud will send something (like an SMS Message) to the vehicle if the vehicle is not actively connected to wake it up. This is where the 12v starts coming into play.
Lucid's API has a wakeup command, which we don't trigger unless necessary (e.g. if you push the unlock doors button). Otherwise we're only getting old data while the car is asleep - it has a "last updated" time of the last time the car was awake, and most of the data doesn't change.

Here's some of my HA config for Lucid: https://gist.github.com/nshp/5f3b9bffe7011a37468198abc725aa3c

The first file there is my dashboard. You can add this via the HA UI - go to settings, dashboards, add. Switch to your new dashboard, hit the edit (pencil) icon at the top, then the three dots menu, then "raw configuration editor". Paste the whole content of lucid-dashboard.yml into there and hit save. This also requires the HA extension "card-mod" for some fancy dynamic styling tricks, as well as some images. Th

The second file adds some extra sensors derived from the Lucid integration data, giving you a 15 minute rolling average efficiency in mi/kWh, as well as a range (miles) prediction based on that. Note that these sensors will either be unavailable or absolutely bonkers values until you actually drive again. This one has to be added to your HA configuration.yml manually. There's no way to add the statistics sensors from the UI currently as far as I know.
 
The forum is giving me trouble with finishing that middle paragraph for some reason. Chopped it off right in the middle. Let's try this again:

The first file there is my dashboard. You can add this via the HA UI - go to settings, dashboards, add. Switch to your new dashboard, hit the edit (pencil) icon at the top, then the three dots menu, then "raw configuration editor". Paste the whole content of lucid-dashboard.yml into there and hit save. This requires the HA extension "card-mod" from HACS for some dynamic styling tricks. It also requires some images which can be found here. Unzip that directly into your HA config directory. You may have to restart HA to get it to see these new files.
 
The second file adds some extra sensors derived from the Lucid integration data, giving you a 15 minute rolling average efficiency in mi/kWh, as well as a range (miles) prediction based on that. Note that these sensors will either be unavailable or absolutely bonkers values until you actually drive again. This one has to be added to your HA configuration.yml manually. There's no way to add the statistics sensors from the UI currently as far as I know.
Do i need to edit the raw text in your second file to replace "icloud" with the name of my car like I did on the first file, before pasting this in to configuration.yaml ?
 
Do i need to edit the raw text in your second file to replace "icloud" with the name of my car like I did on the first file, before pasting this in to configuration.yaml ?
Yup. I wish there was a way to make that more automatic, but I don't know how to do that with HA.
 
Yup. I wish there was a way to make that more automatic, but I don't know how to do that with HA.
thanks. maybe replicate your comment from the first file into the second one as well.

i think it's working for me. two sensor errors, but as stated somewhere in the docs, that is because i haven't driven the car since setting this up.
It should look like this in HA when i go to the new dashboard?
Screenshot 2024-02-22 at 12.02.28 PM.webp
 
thanks. maybe replicate your comment from the first file into the second one as well.

i think it's working for me. two sensor errors, but as stated somewhere in the docs, that is because i haven't driven the car since setting this up.
It should look like this in HA when i go to the new dashboard?
View attachment 18577
You're close. I think those two sensor errors are saying the sensors actually aren't added yet, not just that there's no data. Double check the names against what you put in your configuration.yml, and be sure to restart HA or reload its config.
 
You're close. I think those two sensor errors are saying the sensors actually aren't added yet, not just that there's no data. Double check the names against what you put in your configuration.yml, and be sure to restart HA or reload its config.
thanks, will go to PM so won't distract other users.
 
I tried to do the same steps here but not getting the same results
 

Attachments

  • Screenshot 2024-02-23 at 8.14.06 AM.webp
    Screenshot 2024-02-23 at 8.14.06 AM.webp
    20.8 KB · Views: 68
I have the same issue with sensors, will check the names again
 

Attachments

  • IMG_5376.webp
    IMG_5376.webp
    46.1 KB · Views: 59
The main reason I've shied away from HA is the potential for hacking....especially if it will be controlling my garage doors. Are my fears overblown, or what can be done to mitigate this? I'd love to be able to have the garage doors open as I'm arriving without my having to push a button.
 
The main reason I've shied away from HA is the potential for hacking....especially if it will be controlling my garage doors. Are my fears overblown, or what can be done to mitigate this? I'd love to be able to have the garage doors open as I'm arriving without my having to push a button.
I will recommend using RATGDO which is local and not going thru the cloud, you can use a homekit integration directly without going to HA, now in HA it gives you a lot
of flexibility. I have 2 factor authentication and I don’t have HA going outside my firewall. So in essence everything is hackable, but you are making it harder. I even control my pool within HA.
 
Back
Top