Skip to content

Commit

Permalink
Update Lovelace-predict-card.yaml
Browse files Browse the repository at this point in the history
fix template format
  • Loading branch information
HAuser1234 authored May 8, 2023
1 parent d2baf89 commit 0d44195
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions Lovelace-predict-card.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: vertical-stackcards:
- type: custom:mushroom-template-card
primary: Batterie Morgens
secondary:>-
{%if states.sensor.pv_batterie_morgensrestladung.state|int<0 %}Nicht verf%C3%BCgbar{%elif states.sensor.pv_batterie_morgensrestladung.state|int>20 %}zu ~{{states.sensor.pv_batterie_morgensrestladung.state}}% voll {%else%}kleiner 20% !{%endif%}
{%if states.sensor.pv_batterie_morgensrestladung.state|int<0 %}Nichtverf%C3%BCgbar{%elif states.sensor.pv_batterie_morgensrestladung.state|int>20 %}zu ~{{states.sensor.pv_batterie_morgensrestladung.state}}% voll {%else%}kleiner 20% !{%endif%}
icon: mdi:battery-charging-100
icon_color: >-
{%if states.sensor.pv_batterie_morgensrestladung.state|int<0 %}grey{%elif states.sensor.pv_batterie_morgensrestladung.state|int>20 %}green{%else%}orange{%endif%}
{%if states.sensor.pv_batterie_morgensrestladung.state|int<0 %}grey{%elif states.sensor.pv_batterie_morgensrestladung.state|int>20 %}green{%else%}orange{%endif%}
tap_action:
action: more-info
entity: sensor.pv_batterie_morgensrestladung
Expand All @@ -42,9 +42,9 @@ type: vertical-stackcards:
- type: custom:mushroom-template-card
primary: Min Batteriestand
secondary: >-
{%if states.sensor.pv_minimum_batterie_prozent.state>states.sensor.battery_level.state
and (states.sensor.pv_minimum_batterie_prozent.state|int)>0 and (states.sensor.pv_minimum_batterie_prozent.state|int-states.sensor.battery_level.state|int)>0%} {{states.sensor.pv_minimum_batterie_prozent.state|int-states.sensor.battery_level.state|int}}% fehlen noch
{%elif states.sensor.pv_minimum_batterie_prozent.state|int>0%} {{states.sensor.pv_minimum_batterie_prozent.state|int}}% ist
{%if states.sensor.pv_minimum_batterie_prozent.state>states.sensor.battery_level.state
and (states.sensor.pv_minimum_batterie_prozent.state|int)>0 and (states.sensor.pv_minimum_batterie_prozent.state|int-states.sensor.battery_level.state|int)>0%}{{states.sensor.pv_minimum_batterie_prozent.state|int-states.sensor.battery_level.state|int}}% fehlen noch
{%elif states.sensor.pv_minimum_batterie_prozent.state|int>0%}{{states.sensor.pv_minimum_batterie_prozent.state|int}}% ist
erreicht{%else%}{%endif%}
icon: mdi:battery-30
Expand All @@ -64,23 +64,19 @@ type: vertical-stackcards:
- type: custom:mushroom-template-card
primary: Batterie Abends
secondary: >-
{%if states.sensor.pv_batterie_ladestand_abends.state|int(0)>95 and states.sensor.pv_batterie_ladezeit.state|int(0)>-0.1%}100% voll{%
elif states.sensor.pv_batterie_ladezeit.state|int<0.1%} nicht genug
solar{%else%}zu
~{{states.sensor.pv_batterie_ladestand_abends.state}} voll {%endif%}
{%if states.sensor.pv_batterie_ladestand_abends.state|int(0)>95 and states.sensor.pv_batterie_ladezeit.state|int(0)>-0.1%}100% voll
{%elif states.sensor.pv_batterie_ladezeit.state|int<0.1%} nicht genug solar{%else%}zu ~{{states.sensor.pv_batterie_ladestand_abends.state}} voll {%endif%}
icon: mdi:battery-charging-100
icon_color: >-
{%if states.sensor.pv_batterie_ladestand_abends.state|int(0)>95 and states.sensor.pv_batterie_ladezeit.state|int(0)>-0.1 %}green{%elif states.sensor.pv_batterie_ladezeit.state|int(0)<0.1%}{%else%}orange{%endif%}
{%if states.sensor.pv_batterie_ladestand_abends.state|int(0)>95 and states.sensor.pv_batterie_ladezeit.state|int(0)>-0.1 %}green{%elif states.sensor.pv_batterie_ladezeit.state|int(0)<0.1%}{%else%}orange{%endif%}
tap_action:
action: more-info
entity: sensor.pv_batterie_ladestand_abends
- type: custom:mushroom-template-card
primary: Restladezeit
secondary: > {%if states.sensor.pv_batterie_ladezeit.state|int(0)<0.1 and states.sensor.pv_batterie_ladezeit.state|int(0)>-0.1%} ist
voll{%elif
states.sensor.pv_batterie_ladezeit.state|int(0)<0.1%}nicht genug
Solar {%else%}noch {{states.sensor.pv_batterie_ladezeit.state}}
Stunden{%endif%}
secondary: >
{%if states.sensor.pv_batterie_ladezeit.state|int(0)<0.1 and states.sensor.pv_batterie_ladezeit.state|int(0)>-0.1%} ist voll
{%elif states.sensor.pv_batterie_ladezeit.state|int(0)<0.1%}nicht genug Solar {%else%}noch {{states.sensor.pv_batterie_ladezeit.state}}Stunden{%endif%}
icon: mdi:camera-timer
entity: sensor.pv_batterie_ladezeit
icon_color: >-
Expand Down

0 comments on commit 0d44195

Please sign in to comment.