I have been trying for days now to get the iPhone lock screen gauge to work. A few people on Facebook have been extremely helpful but still it wont display the entity state properly. All I get is a gauge with questions marks.
Can anyone help?
Currently I have the following script . Value template (0-1)
{% set original = states(‘sensor.ioniq_5_ev_battery_level’) | float %}
{% set minimum = 0 %}
{% set maximum = 100 %}
{% set adjusted = min(maximum, max(minimum, original)) %}
{{ (adjusted - minimum) / (maximum - minimum) }}
Value Label template
{{states(‘sensor.ioniq_5_ev_battery_level’) }}
{% set original = states("sensor.batteries_state_of_capacity") | float %}
{% set minimum = 0.0 %}
{% set maximum = 100.0 %}
{% set adjusted = min(maximum, max(minimum, original)) %}
{{ (adjusted - minimum) / (maximum - minimum) }}
in the value template field, 0 for min label template, 100 for max label template and “Bat” for value lable template. Probably overkill for a percentage value, but it worked right away.
I have exactly that with my ev battery entity in but still it wont display anything other than a gauge with ? on.
Going to try another entity even thou it works fine in the developer tools test
After recent HA Companion app update, all of my lock screen HA widgets stopped to work (Unable to load). Perhaps there is some issue for you with that as weel. Can you try just action windet, or any other? BTW widgets load properly on home screen…
@mccltd Only other thing I can think of is for you to check if your home assistant components are at their latest level?
@mirekmal I have a similar issue, not sure how often these are supposed to update but it seems quite slow. Slow enough to be not terribly useful. Perhaps I’m using it wrong – I setup 3 widgets put my battery %age, house energy draw + solar production (both W). The last two values change very fast whereas the percentage does not.
I ended up with using it only for actions; that was convinient to have the readily available on the lock screen. Previously sooner or lated actions were available in the widget. Now, it is already copuple of days and still ‘unable to load’… I’d not call it delay… it just does not work at all