Replies: 2 comments 1 reply
-
Error here. You can't construct a string for equality. Suggest
Also error here as you are returning a string. Suggest
|
Beta Was this translation helpful? Give feedback.
0 replies
-
It's just syntax error: label: >
[[[
if (entity.attributes.unit_of_measurement == '%' )
return `${entity.state}% Remaining`;
else
return `${entity.state / 3} + % Remaining`;
]]]
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use a template to accommodate when batteries report either V or %. Nominal voltage is 3V, two AA batteries in series.
Here is my attempt.
but the syntax check fails. I've traversed the git examples and don't see a similar example.
Beta Was this translation helpful? Give feedback.
All reactions