Closed 1achy closed 4 months ago
Hi there, I sadly don't understand what you are asking. I can highly recommend using Deepl as a translator or give me more context of what you are trying to achieve. Take care!
I would like to reverse the battery energy flow arrows. I have an entity that gives me the charging and discharging of the battery and based on this entity I would like to change towards arrows
example:
i want some like this:
i dont know us make this
This is correct :?
invert_arrow : {%- set sensor = states('sensor.esolar_batterydirection') %} {%- if sensor == 'Charging' %} True {%- elif sensor == 'Standby' %} 0 {%- else %} False {%- endif %}
Ah ok i see what you are trying to do. Sadly the yaml parsing for card configurations doesn't support jinja templates that I am aware of. However, there should be a relatively easy solution for this by utilizing helpers.
Fill out the necessary information which should roughly like this:
with the following State template:
{% if is_state('sensor.esolar_batterydirection', 'Charging') %}
{{ states('sensor.esolar_totalloadpower') | int * -1}}
{% else %}
{{ states('sensor.esolar_totalloadpower') | int}}
{% endif %}
Afterwards you can just use your new helper sensor as the entity for the tile.
Hope this helps!
VERY VERY tks ;)
Is it possible make if respect entity direction enrgy for invert battery arrow?