title: Tanken views:
- title: Diesel
path: diesel
icon: mdi:gas-station
type: sections
max_columns: 2
sections:
- type: grid
cards:
-
type: heading heading: Jetzt tanken? heading_style: title icon: mdi:gas-station
-
type: markdown grid_options: columns: full content: >- {%- set current = states('sensor.diesel_gunstigster_preis') %}
{%- set low = states('sensor.diesel_7_tage_tief') %}
{%- if is_number(current) and is_number(low) %}
{%- set gap = (current | float - low | float) * 100 %}
{{ '%.3f' | format(current | float) | replace('.', ',') }} €
{% if gap < 0.05 %}Das ist das 7-Tage-Tief.{% else %}{{ '%.1f' | format(gap) | replace('.', ',') }} ct über dem 7-Tage-Tief von {{ '%.3f' | format(low | float) | replace('.', ',') }} €{% endif %}
{%- else %}Noch keine Preise{% endif %}
-
type: heading heading: Diesel heute heading_style: subtitle
-
type: markdown grid_options: columns: full content: >- {% set sensors = [ 'sensor.aral_mainzer_strasse_42_diesel', 'sensor.bft_landstr_6a_diesel', 'sensor.hem_zur_ganswiese_11_diesel', 'sensor.totalenergies_hattsteinstr_4_diesel' ] %}
{%- set valid = sensors | select('has_value') | list %}
{%- set ranked = zip(valid | map('states') | map('float') | list, valid) | list | sort %}
{% for price, s in ranked %}
{%- set brand = state_attr(s, 'brand') %}
{%- set street = state_attr(s, 'street') | trim | title %}
{{ loop.index }}. {{ '%.3f' | format(price) | replace('.', ',') }} € {{ brand }}, {{ street }}
{% endfor %}
-
type: heading heading: Einstellungen heading_style: subtitle
-
type: entities grid_options: columns: full entities:
- entity: input_number.diesel_preisschwelle name: Feste Schwelle
- entity: input_number.diesel_abstand_zum_tief name: Abstand zum Tief
- entity: automation.diesel_ist_gunstig name: Meldung unter Schwelle
- entity: automation.diesel_nahe_am_7_tage_tief name: Meldung nahe am Tief
-
- type: grid
cards:
- type: heading heading: Die letzten sieben Tage heading_style: title icon: mdi:chart-line
- type: history-graph
hours_to_show: 168
grid_options:
columns: full
entities:
- entity: sensor.diesel_gunstigster_preis name: Günstigster Preis
- entity: sensor.diesel_7_tage_tief name: 7-Tage-Tief
- type: heading heading: Wo heading_style: subtitle
- type: map
cluster: false
default_zoom: 14
grid_options:
columns: full
rows: 8
entities:
- entity: sensor.aral_mainzer_strasse_42_diesel label_mode: attribute attribute: brand
- entity: sensor.bft_landstr_6a_diesel label_mode: attribute attribute: brand
- entity: sensor.hem_zur_ganswiese_11_diesel label_mode: attribute attribute: brand
- entity: sensor.totalenergies_hattsteinstr_4_diesel label_mode: attribute attribute: brand theme_mode: auto
- type: grid
cards:
