gerd_r

Spritpreise

Dec 6th, 2023
1,085
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 9.02 KB | Source Code | 0 0
  1. square: false
  2. type: custom:stack-in-card
  3. cards:
  4.   - type: horizontal-stack
  5.     cards:
  6.       - type: custom:layout-card
  7.         layout_type: custom:grid-layout
  8.         cards:
  9.           - type: custom:mushroom-entity-card
  10.             entity: sensor.shell_neusser_str_55_super
  11.             secondary_info: name
  12.             icon_type: none
  13.             tap_action:
  14.               action: more-info
  15.             fill_container: true
  16.             primary_info: none
  17.             name: Shell
  18.             layout: vertical
  19.             card_mod:
  20.               style: |
  21.                ha-card {
  22.                   --card-primary-font-size: 18px;
  23.                   --card-secondary-font-size: 16px;
  24.                 }
  25.           - type: custom:mushroom-template-card
  26.             layout: vertical
  27.             icon: mdi:gas-station
  28.             icon_color: |-
  29.               {% if states('sensor.shell_neusser_str_55_super') != 'unknown' %}
  30.                 {% set benzinpreis = states('sensor.shell_neusser_str_55_super') | float %}
  31.                 {% if benzinpreis <= (states('input_number.benzinpreis_schwellwert_gelb')) | float(0) %}
  32.                   #00ff00
  33.                 {% elif benzinpreis <= (states('input_number.benzinpreis_schwellwert_rot')) | float(0) %}
  34.                   #FFA500
  35.                 {% else %}
  36.                   #ff0000
  37.                 {% endif %}
  38.               {% else %}
  39.                 #000000
  40.               {% endif %}
  41.             entity: sensor.shell_neusser_str_55_super
  42.             tap_action:
  43.               action: more-info
  44.             multiline_secondary: true
  45.             fill_container: true
  46.             secondary: >-
  47.               {% set benzinpreis = states('sensor.shell_neusser_str_55_super')
  48.               %} {% if benzinpreis == 'unknown' %}
  49.                 Geschlossen
  50.               {% elif benzinpreis == 'False' %}
  51.                 -,-- €
  52.               {% else %}
  53.                 {{ '%.2f' | format(benzinpreis | float(0)) }} €
  54.               {% endif %}
  55.             card_mod:
  56.               style: |
  57.                ha-card {
  58.                   margin-top: -20px;
  59.                   padding: 0;
  60.                   --icon-size: 60px;
  61.                   --card-primary-font-size: 18px;
  62.                 }'
  63.         layout:
  64.           width: 50
  65.       - type: custom:layout-card
  66.         layout_type: custom:grid-layout
  67.         layout:
  68.           width: 50
  69.         cards:
  70.           - type: custom:mushroom-entity-card
  71.             entity: sensor.shell_bahnstr_27_super
  72.             secondary_info: name
  73.             icon_type: none
  74.             layout: vertical
  75.             tap_action:
  76.               action: more-info
  77.             fill_container: true
  78.             primary_info: none
  79.             name: Shell
  80.             card_mod:
  81.               style: |
  82.                ha-card {
  83.                   --card-primary-font-size: 18px;
  84.                   --card-secondary-font-size: 16px;
  85.                 }
  86.           - type: custom:mushroom-template-card
  87.             layout: vertical
  88.             icon: mdi:gas-station
  89.             icon_color: |-
  90.               {% if states('sensor.shell_bahnstr_27_super') != 'unknown' %}
  91.                 {% set benzinpreis = states('sensor.shell_bahnstr_27_super') | float %}
  92.                 {% if benzinpreis <= (states('input_number.benzinpreis_schwellwert_gelb')) | float(0) %}
  93.                   #00ff00
  94.                 {% elif benzinpreis <= (states('input_number.benzinpreis_schwellwert_rot')) | float(0) %}
  95.                   #FFA500
  96.                 {% else %}
  97.                   #ff0000
  98.                 {% endif %}
  99.               {% else %}
  100.                 #000000
  101.               {% endif %}
  102.             entity: sensor.shell_bahnstr_27_super
  103.             tap_action:
  104.               action: more-info
  105.             multiline_secondary: true
  106.             fill_container: true
  107.             secondary: >-
  108.               {% set benzinpreis = states('sensor.shell_bahnstr_27_super') %} {%
  109.               if benzinpreis == 'unknown' %}
  110.                 Geschlossen
  111.               {% elif benzinpreis == 'False' %}
  112.                 -,-- €
  113.               {% else %}
  114.                 {{ '%.2f' | format(benzinpreis | float(0)) }} €
  115.               {% endif %}
  116.             card_mod:
  117.               style: |
  118.                ha-card {
  119.                   margin-top: -20px;
  120.                   padding: 0;
  121.                   --icon-size: 60px;
  122.                   --card-primary-font-size: 18px;
  123.                 }'
  124.       - type: custom:layout-card
  125.         layout_type: custom:grid-layout
  126.         layout:
  127.           width: 50
  128.         cards:
  129.           - type: custom:mushroom-entity-card
  130.             entity: sensor.freie_tankstelle_e_wippenhohn_e_k_robert_bosch_str_2_super
  131.             secondary_info: name
  132.             icon_type: none
  133.             layout: vertical
  134.             tap_action:
  135.               action: more-info
  136.             fill_container: true
  137.             primary_info: none
  138.             name: Freie
  139.             card_mod:
  140.               style: |
  141.                ha-card {
  142.                   --card-primary-font-size: 18px;
  143.                   --card-secondary-font-size: 16px;
  144.                 }
  145.           - type: custom:mushroom-template-card
  146.             layout: vertical
  147.             icon: mdi:gas-station
  148.             icon_color: >-
  149.               {% if
  150.               states('sensor.freie_tankstelle_e_wippenhohn_e_k_robert_bosch_str_2_super')
  151.               != 'unknown' %}
  152.                 {% set benzinpreis = states('sensor.freie_tankstelle_e_wippenhohn_e_k_robert_bosch_str_2_super') | float %}
  153.                 {% if benzinpreis <= (states('input_number.benzinpreis_schwellwert_gelb')) | float(0) %}
  154.                   #00ff00
  155.                 {% elif benzinpreis <= (states('input_number.benzinpreis_schwellwert_rot')) | float(0) %}
  156.                   #FFA500
  157.                 {% else %}
  158.                   #ff0000
  159.                 {% endif %}
  160.               {% else %}
  161.                 #000000
  162.               {% endif %}
  163.             entity: sensor.freie_tankstelle_e_wippenhohn_e_k_robert_bosch_str_2_super
  164.             tap_action:
  165.               action: more-info
  166.             multiline_secondary: true
  167.             fill_container: true
  168.             secondary: >-
  169.               {% set benzinpreis =
  170.               states('sensor.freie_tankstelle_e_wippenhohn_e_k_robert_bosch_str_2_super')
  171.               %} {% if benzinpreis == 'unknown' %}
  172.                 Geschlossen
  173.               {% elif benzinpreis == 'False' %}
  174.                 -,-- €
  175.               {% else %}
  176.                 {{ '%.2f' | format(benzinpreis | float(0)) }} €
  177.               {% endif %}
  178.             card_mod:
  179.               style: |
  180.                ha-card {
  181.                   margin-top: -20px;
  182.                   padding: 0;
  183.                   --icon-size: 60px;
  184.                   --card-primary-font-size: 18px;
  185.                 }'
  186.       - type: custom:layout-card
  187.         layout_type: custom:grid-layout
  188.         layout:
  189.           width: 50
  190.         cards:
  191.           - type: custom:mushroom-entity-card
  192.             entity: sensor.avex_glescher_str_126_super
  193.             secondary_info: name
  194.             icon_type: none
  195.             layout: vertical
  196.             tap_action:
  197.               action: more-info
  198.             fill_container: true
  199.             primary_info: none
  200.             name: Avex
  201.             card_mod:
  202.               style: |
  203.                ha-card {
  204.                   --card-primary-font-size: 18px;
  205.                   --card-secondary-font-size: 16px;
  206.                 }
  207.           - type: custom:mushroom-template-card
  208.             layout: vertical
  209.             icon: mdi:gas-station
  210.             icon_color: |-
  211.               {% if states('sensor.avex_glescher_str_126_super') != 'unknown' %}
  212.                 {% set benzinpreis = states('sensor.avex_glescher_str_126_super') | float %}
  213.  
  214.                 {% if benzinpreis <= (states('input_number.benzinpreis_schwellwert_gelb')) | float(0) %}
  215.                   #00ff00
  216.                 {% elif benzinpreis <= (states('input_number.benzinpreis_schwellwert_rot')) | float(0) %}
  217.                   #FFA500
  218.                 {% else %}
  219.                   #ff0000
  220.                 {% endif %}
  221.               {% else %}
  222.                 #000000
  223.               {% endif %}
  224.             entity: sensor.avex_glescher_str_126_super
  225.             tap_action:
  226.               action: more-info
  227.             multiline_secondary: true
  228.             fill_container: true
  229.             secondary: >-
  230.               {% set benzinpreis = states('sensor.avex_glescher_str_126_super')
  231.               %} {% if benzinpreis == 'unknown' %}
  232.                 Geschlossen
  233.               {% elif benzinpreis == 'False' %}
  234.                 -,-- €
  235.               {% else %}
  236.                 {{ '%.2f' | format(benzinpreis | float(0)) }} €
  237.               {% endif %}
  238.             card_mod:
  239.               style: |
  240.                ha-card {
  241.                   margin-top: -20px;
  242.                   padding: 0;
  243.                   --icon-size: 60px;
  244.                   --card-primary-font-size: 18px;
  245.                 }'
  246. columns: 1
  247.  
Advertisement
Add Comment
Please, Sign In to add comment