Comments (2)
It looks like that sensor returns 65535 when charging is not happening. @jgoldman1 you can work around this by wrapping the sensor in an availability template (substitute your vehicle name):
# Lucid Air sensor templates
- platform: template
sensors:
lucid_air_charge_session_time_remaining_template:
friendly_name: "Lucid Air Charge session time remaining template"
device_class: duration
unit_of_measurement: minutes
availability_template: >-
{% if states('sensor.lucid_air_charge_session_time_remaining') | int == 65535 %}
unavailable
{% else %}
true
{% endif %}
value_template: >-
{{ states('sensor.lucid_air_charge_session_time_remaining') }}
Then just use the template as the entity in your dashboard card instead of the original one.
If you don't want the sensor to appear unavailable when not charging, you could instead just change the value_template
to return 0 when it sees 65535.
- platform: template
sensors:
lucid_air_charge_session_time_remaining_template:
friendly_name: "Lucid Air Charge session time remaining template"
device_class: duration
unit_of_measurement: minutes
value_template: >-
{% if states('sensor.lucid_air_charge_session_time_remaining') | int == 65535 %}
0
{% else %}
{{ states('sensor.lucid_air_charge_session_time_remaining') }}
{% endif %}
from ha-lucidmotors.
I think that's a max value used when there is no charge session - we should just catch that and set it to Unavailable or something. The formatting is HA's problem though - it just doesn't display durations longer than hours well. We could format it ourselves, but that would just make automations more difficult.
from ha-lucidmotors.
Related Issues (19)
- Install Problem HOT 10
- Make frunk and trunk "cover" entities HOT 3
- Add climate control entity HOT 4
- Add service appointments to HA calendar automatically
- Add Cover entity for charge port door HOT 1
- Add an entity for arming/disarming the alarm HOT 2
- Add a Number entity for setting the charge limit HOT 1
- Add a switch to start or stop charging HOT 1
- Add a "share trip" service
- Hook up the ApplySoftwareUpdate API HOT 1
- Charge Limit - invalid entry possible, generates error
- TPMS sensors - cache last values to report even when car is off HOT 2
- Spurious location change events HOT 4
- Climate related warning in the HA logs
- Not working with non US account HOT 14
- Failed to contact Lucid cloud services HOT 4
- Integration fails to load after updating to 1.0.6 HOT 4
- Fails to load on HA Core 2024.6.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-lucidmotors.