Carte astro type oscilloscope

Hello,

Je suis en train de regarder pour faire ma carte astro qui se base sur astro weather, je voudrais pouvoir afficher plusieurs graph ( dans la minigraph, je ne veux pas installer de carte en plus pour la maintenance ) suivant si un ou plusieurs boutons (custom button card ) sont sélectionnés ou pas, j’ai tenté une approche avec des helpers en boolean pour 3 valeurs de tests, mais je me casse les dents sur le rendu graphique qui casse à chaque fois que plusieurs entités sont sélectionnées ( chargement infini de la minigraph ), au point que je pense que ça n’est pas possible.

Je voudrais aussi me passer de la astroweather card, que j’ai installé pour voir :slight_smile:

En désespoir, je me suis rabattu sur un input select, du coup la mini graph se recalcule à chaque fois

j’en parle juste si quelqu’un a une idée, sinon je resterai comme ça

1

code actuel qui fonctionne
type: custom:button-card
name: ANALYSE ASTRO
variables:
  selection: "[[[ return states['input_select.astroweather'].state ]]]"
styles:
  card:
    - background: rgba(0, 0, 0, 0.4)
    - border: 2px solid rgba(255, 255, 255, 0.5)
    - border-radius: 12px
    - padding: 10px
  grid:
    - grid-template-areas: "'n' 'tabs1' 'tabs2' 'graph'"
    - grid-template-rows: auto auto auto 180px
  name:
    - justify-self: start
    - font-size: 13px
    - font-weight: bold
    - color: "#3498db"
    - padding-bottom: 10px
custom_fields:
  tabs1:
    card:
      type: horizontal-stack
      cards:
        - type: custom:button-card
          name: ROSEE 2m
          entity: sensor.astroweather_backyard_2m_dewpoint
          show_icon: true
          show_label: true
          size: 20px
          label: >-
            [[[ return states['sensor.astroweather_backyard_2m_dewpoint'].state
            + '°C' ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Rosee' ? '#3498db' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Rosee
        - type: custom:button-card
          name: TEMP 2m
          entity: sensor.astroweather_backyard_2m_temperature
          show_icon: true
          show_label: true
          size: 20px
          label: >-
            [[[ return
            states['sensor.astroweather_backyard_2m_temperature'].state + '°C'
            ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Temp' ? '#ff7675' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Temp
        - type: custom:button-card
          name: CIEL
          entity: sensor.astroweather_backyard_cloud_cover
          show_icon: true
          show_label: true
          size: 20px
          label: >-
            [[[ return states['sensor.astroweather_backyard_cloud_cover'].state
            + '%' ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Nuages' ? '#74b9ff' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Nuages
        - type: custom:button-card
          name: SEEING
          entity: sensor.astroweather_backyard_seeing_percentage
          show_icon: true
          show_label: true
          size: 20px
          label: >-
            [[[ return
            states['sensor.astroweather_backyard_seeing_percentage'].state + '%'
            ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Seeing' ? '#2ecc71' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Seeing
  tabs2:
    card:
      type: horizontal-stack
      cards:
        - type: custom:button-card
          name: VENT 10m
          entity: sensor.astroweather_backyard_10m_wind_speed
          show_icon: true
          show_label: true
          size: 20px
          label: |-
            [[[ 
              var speed = parseFloat(states['sensor.astroweather_backyard_10m_wind_speed'].state);
              return speed.toFixed(2) + ' m/s'; 
            ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Vent' ? '#f1c40f' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Vent
        - type: custom:button-card
          name: HUMID 2m
          entity: sensor.astroweather_backyard_2m_relative_humidity
          show_icon: true
          show_label: true
          size: 20px
          label: >-
            [[[ return
            states['sensor.astroweather_backyard_2m_relative_humidity'].state +
            '%' ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Humidite' ? '#9b59b6' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Humidite
        - type: custom:button-card
          name: TRANS
          entity: sensor.astroweather_backyard_transparency
          show_icon: true
          show_label: true
          size: 20px
          label: >-
            [[[ return states['sensor.astroweather_backyard_transparency'].state
            + '%' ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Transparence' ? '#e67e22' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Transparence
        - type: custom:button-card
          name: NOIR
          entity: sensor.astroweather_backyard_deep_sky_darkness
          show_icon: true
          show_label: true
          size: 20px
          label: |-
            [[[ 
              var sec = states['sensor.astroweather_backyard_deep_sky_darkness'].state;
              return Math.round(sec / 60) + ' min'; 
            ]]]
          styles:
            card:
              - height: 35px
              - border-radius: 6px
              - padding: 4px
              - background: >-
                  [[[ return states['input_select.astroweather'].state ===
                  'Noirceur' ? '#1abc9c' : 'rgba(255,255,255,0.05)' ]]]
            grid:
              - grid-template-areas: "'i n' 'i l'"
              - grid-template-columns: 40% 60%
              - grid-template-rows: 1fr 1fr
            icon:
              - color: white
              - justify-self: center
            name:
              - font-size: 11px
              - font-weight: bold
              - justify-self: start
              - align-self: end
            label:
              - font-size: 11px
              - color: white
              - justify-self: start
              - align-self: start
          tap_action:
            action: call-service
            service: input_select.select_option
            service_data:
              entity_id: input_select.astroweather
              option: Noirceur
  graph:
    card:
      type: custom:mini-graph-card
      entities:
        - entity: |
            [[[ 
              const mode = states['input_select.astroweather'].state;
              if (mode === 'Rosee') return 'sensor.astroweather_backyard_2m_dewpoint';
              if (mode === 'Temp') return 'sensor.astroweather_backyard_2m_temperature';
              if (mode === 'Nuages') return 'sensor.astroweather_backyard_cloud_cover';
              if (mode === 'Seeing') return 'sensor.astroweather_backyard_seeing_percentage';
              if (mode === 'Vent') return 'sensor.astroweather_backyard_10m_wind_speed';
              if (mode === 'Humidite') return 'sensor.astroweather_backyard_2m_relative_humidity';
              if (mode === 'Transparence') return 'sensor.astroweather_backyard_transparency';
              if (mode === 'Noirceur') return 'sensor.astroweather_backyard_deep_sky_darkness';
              return 'sensor.astroweather_backyard_2m_temperature';
            ]]]
      line_color: |
        [[[ 
          const mode = states['input_select.astroweather'].state;
          const colors = {
            'Rosee': '#3498db', 'Temp': '#ff7675', 'Nuages': '#74b9ff', 'Seeing': '#2ecc71',
            'Vent': '#f1c40f', 'Humidite': '#9b59b6', 'Transparence': '#e67e22', 'Noirceur': '#1abc9c'
          };
          return colors[mode] || '#ffffff';
        ]]]
      line_width: 3
      hours_to_show: 24
      show:
        name: false
        icon: false
        state: true
        legend: false
      style: >
        ha-card { background: none !important; border: none !important;
        box-shadow: none !important; }

merci pour les idées au cas où :slight_smile:
cdt

1 « J'aime »

Re,

hors le graph ça avance sinon :slight_smile:

il en manque encore et va falloir streamliniser :sweat_smile:

cdt

Re,

On est pas mal sinon :slight_smile: encore un peu de boulot à voir si la disposition change pas mais j’ai la structure

cdt

1 « J'aime »

Re,

si ça intéresse, faudra me dire que j’apporte d’éventuelles corrections pour que vous n’ayez pas à le faire, une fois que j’aurai fini, je n’y reviendrais plus. Pour le moment c’est encore en custom button card et minigraph, mais vu que le code est imbuvable (environ 2500 lignes de code) je vais passer les boutons en streamline template

seuls les 8 boutons à gauche du graphe remontent dans le graphe

j’ai supprimé le bouton « lieu » pour placer le nom, ça me plaisait moyen la place perdue en haut et j’ai corrigé le Fog 2m qui y était 2 fois

Je met le code de la carte du haut, je ne travaille plus que sur la carte du bas la correction de la dernière tabs3 > fog 2m n’est pas faite

Code de la carte du haut
      - type: custom:button-card
        styles:
          grid:
            - grid-template-columns: repeat(3, 1fr)
            - grid-template-areas: |
                "top top top"
            - grid-row-gap: 10px
            - grid-column-gap: 10px
          card:
            - background: none
            - border: none
            - padding: 0px
        custom_fields:
          top:
            card:
              type: custom:button-card
              name: ANALYSE ASTRO
              variables:
                selection: "[[[ return states['input_select.astroweather'].state ]]]"
              styles:
                card:
                  - background: rgba(0, 0, 0, 0.4)
                  - border: 2px solid rgba(255, 255, 255, 0.5)
                  - border-radius: 12px
                  - padding: 10px
                grid:
                  - grid-template-columns: 102px 102px 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 102px 102px
                  - grid-template-rows: auto 42px 42px 42px 42px 42px 42px 42px 42px
                  - grid-row-gap: 4px
                  - grid-template-areas: >
                      "n n n n n n n n n n n n"

                      "tabs1 tabs1 tabs1 tabs1 tabs1 tabs1 tabs1 tabs1 tabs1
                      tabs1 tabs1 tabs1"

                      "tabs2 tabs2 tabs2 tabs2 tabs2 tabs2 tabs2 tabs2 tabs2
                      tabs2 tabs2 tabs2"

                      "L1 L11 graph graph graph graph graph graph graph graph
                      R11 R1"

                      "L2 L12 graph graph graph graph graph graph graph graph
                      R12 R2"

                      "L3 L13 graph graph graph graph graph graph graph graph
                      R13 R3"

                      "L4 L14 graph graph graph graph graph graph graph graph
                      R14 R4"

                      "tabs3 tabs3 tabs3 tabs3 tabs3 tabs3 tabs3 tabs3 tabs3
                      tabs3 tabs3 tabs3"

                      "tabs4 tabs4 tabs4 tabs4 tabs4 tabs4 tabs4 tabs4 tabs4
                      tabs4 tabs4 tabs4"
                name:
                  - justify-self: start
                  - font-size: 13px
                  - font-weight: bold
                  - color: "#3498db"
                  - padding-bottom: 10px
              custom_fields:
                tabs1:
                  card:
                    type: horizontal-stack
                    cards:
                      - type: custom:button-card
                        name: CONDITION
                        entity: sensor.astroweather_backyard_condition
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_condition'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: CLOUDLESS
                        entity: sensor.astroweather_backyard_cloudless
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_cloudless'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: UP TONIG
                        entity: sensor.astroweather_backyard_uptonight
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_uptonight'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: CIEL DEEP
                        entity: binary_sensor.astroweather_backyard_deep_sky_view
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['binary_sensor.astroweather_backyard_deep_sky_view'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: CALME %
                        entity: sensor.astroweather_backyard_calm_percentage
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_calm_percentage'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: DEEP TDAY
                        entity: sensor.astroweather_backyard_deepsky_forecast_today
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_today'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: CLOUD LOW
                        entity: sensor.astroweather_backyard_clouds_area_low
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_clouds_area_low'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: CLOUD MOY
                        entity: sensor.astroweather_backyard_clouds_area_medium
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_clouds_area_medium'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: CLOUD HIGH
                        entity: sensor.astroweather_backyard_clouds_area_high
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_clouds_area_high'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: AREA CLOU
                        entity: sensor.astroweather_backyard_clouds_area
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_clouds_area'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: FOG AREA
                        entity: sensor.astroweather_backyard_fog_area
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_fog_area'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: FOG 2M
                        entity: sensor.astroweather_backyard_fog_2m_area
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_fog_2m_area'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                tabs2:
                  card:
                    type: horizontal-stack
                    cards:
                      - type: custom:button-card
                        name: LIFTED I
                        entity: sensor.astroweather_backyard_lifted_index
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_lifted_index'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: PLUIE mm
                        entity: sensor.astroweather_backyard_precipitation_amount
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_precipitation_amount'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: DEEP TMRW
                        entity: sensor.astroweather_backyard_deepsky_forecast_tomorrow
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_tomorrow'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: DESC TDAY
                        entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_today_plain
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_today_plain'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: DESC TMRW
                        entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_tomorrow_plain
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_tomorrow_plain'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: LENGTH
                        entity: sensor.astroweather_backyard_forecast_length
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_forecast_length'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: LIFTED P
                        entity: sensor.astroweather_backyard_lifted_index_plain
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_lifted_index_plain'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TRANSP P
                        entity: sensor.astroweather_backyard_transparency_plain
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_transparency_plain'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TDAY DESC
                        entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_today_description
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_today_description'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TMRW DESC
                        entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_tomorrow_description
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_tomorrow_description'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TDAY PLIN
                        entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_today_plain
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_today_plain'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TMRW PLIN
                        entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_tomorrow_plain
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_deepsky_forecast_tomorrow_plain'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                L1:
                  card:
                    type: custom:button-card
                    name: TEMP 2M
                    entity: sensor.astroweather_backyard_2m_temperature
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_2m_temperature'].state
                      + '°C' ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Temp' ? '#ff7675' : 'rgba(255,255,255,0.05)'
                            ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Temp' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Temp' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Temp' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Temp
                L11:
                  card:
                    type: custom:button-card
                    name: HUMID 2M
                    entity: sensor.astroweather_backyard_2m_relative_humidity
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_2m_relative_humidity'].state
                      + '%' ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - margin-left: 9px
                        - padding: 4px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Humidite' ? '#9b59b6' :
                            'rgba(255,255,255,0.05)' ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Humidite' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Humidite' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Humidite' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Humidite
                L2:
                  card:
                    type: custom:button-card
                    name: ROSEE 2M
                    entity: sensor.astroweather_backyard_2m_dewpoint
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_2m_dewpoint'].state +
                      '°C' ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Rosee' ? '#3498db' : 'rgba(255,255,255,0.05)'
                            ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Rosee' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Rosee' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Rosee' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Rosee
                L12:
                  card:
                    type: custom:button-card
                    name: VENT 10m
                    entity: sensor.astroweather_backyard_10m_wind_speed
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: |-
                      [[[ 
                        var speed = parseFloat(states['sensor.astroweather_backyard_10m_wind_speed'].state);
                        return speed.toFixed(2) + ' km/h'; 
                      ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: 9px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Vent' ? '#f1c40f' : 'rgba(255,255,255,0.05)'
                            ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Vent' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Vent' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Vent' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Vent
                L3:
                  card:
                    type: custom:button-card
                    name: NUAGES
                    entity: sensor.astroweather_backyard_cloud_cover
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_cloud_cover'].state +
                      '%' ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Nuages' ? '#74b9ff' : 'rgba(255,255,255,0.05)'
                            ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Nuages' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Nuages' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Nuages' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Nuages
                L13:
                  card:
                    type: custom:button-card
                    name: TRANSP
                    entity: sensor.astroweather_backyard_transparency
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_transparency'].state
                      + '%' ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: 9px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Transparence' ? '#e67e22' :
                            'rgba(255,255,255,0.05)' ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Transparence' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Transparence' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Transparence' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Transparence
                L4:
                  card:
                    type: custom:button-card
                    name: SEEING
                    entity: sensor.astroweather_backyard_seeing_percentage
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_seeing_percentage'].state
                      + '%' ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Seeing' ? '#2ecc71' : 'rgba(255,255,255,0.05)'
                            ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Seeing' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Seeing' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Seeing' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Seeing
                L14:
                  card:
                    type: custom:button-card
                    name: NOIR
                    entity: sensor.astroweather_backyard_deep_sky_darkness
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: |-
                      [[[ 
                        var sec = states['sensor.astroweather_backyard_deep_sky_darkness'].state;
                        return Math.round(sec / 60) + ' min'; 
                      ]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: 9px
                        - background: >-
                            [[[ return states['input_select.astroweather'].state
                            === 'Noirceur' ? '#1abc9c' :
                            'rgba(255,255,255,0.05)' ]]]
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Noirceur' ? 'black' : 'white' ]]]
                        - justify-self: center
                      name:
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Noirceur' ? 'black' : 'white' ]]]
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: >-
                            [[[ return
                            states['input_select.astroweather'].state  ===
                            'Noirceur' ? 'black' : 'white' ]]]
                        - justify-self: start
                        - align-self: start
                    tap_action:
                      action: call-service
                      service: input_select.select_option
                      service_data:
                        entity_id: input_select.astroweather
                        option: Noirceur
                graph:
                  card:
                    type: custom:mini-graph-card
                    entities:
                      - entity: |
                          [[[ 
                            const mode = states['input_select.astroweather'].state;
                            if (mode === 'Rosee') return 'sensor.astroweather_backyard_2m_dewpoint';
                            if (mode === 'Temp') return 'sensor.astroweather_backyard_2m_temperature';
                            if (mode === 'Nuages') return 'sensor.astroweather_backyard_cloud_cover';
                            if (mode === 'Seeing') return 'sensor.astroweather_backyard_seeing_percentage';
                            if (mode === 'Vent') return 'sensor.astroweather_backyard_10m_wind_speed';
                            if (mode === 'Humidite') return 'sensor.astroweather_backyard_2m_relative_humidity';
                            if (mode === 'Transparence') return 'sensor.astroweather_backyard_transparency';
                            if (mode === 'Noirceur') return 'sensor.astroweather_backyard_deep_sky_darkness';
                            return 'sensor.astroweather_backyard_2m_temperature';
                          ]]]
                    line_color: |
                      [[[ 
                        const mode = states['input_select.astroweather'].state;
                        const colors = {
                          'Rosee': '#3498db', 'Temp': '#ff7675', 'Nuages': '#74b9ff', 'Seeing': '#2ecc71',
                          'Vent': '#f1c40f', 'Humidite': '#9b59b6', 'Transparence': '#e67e22', 'Noirceur': '#1abc9c'
                        };
                        return colors[mode] || '#ffffff';
                      ]]]
                    line_width: 3
                    hours_to_show: 24
                    height: 66
                    show:
                      name: false
                      icon: false
                      state: true
                      legend: false
                    card_mod:
                      style: |
                        ha-card {
                          border-radius: 6px !important;
                          border: 2px solid rgba(255, 255, 255, 0.5) !important;
                          background: none !important;
                          box-shadow: none !important;
                          height: 100% !important;
                          width: 96% !important;    /* Réduit la largeur à 90% de sa zone */
                          margin: 0 auto !important; /* Centre le graph horizontalement */
                          overflow: hidden !important;
                        }
                tabs3:
                  card:
                    type: horizontal-stack
                    cards:
                      - type: custom:button-card
                        name: MOON PH
                        entity: sensor.astroweather_backyard_moon_phase
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_phase'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: MOON ALT
                        entity: sensor.astroweather_backyard_moon_altitude
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_altitude'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: MOON NRIS
                        entity: sensor.astroweather_backyard_moon_next_rising
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_next_rising'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: MOON NFULL
                        entity: sensor.astroweather_backyard_moon_next_full_moon
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_next_full_moon'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: MOON NNEW
                        entity: sensor.astroweather_backyard_moon_next_new_moon
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_next_new_moon'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: SUN ALT
                        entity: sensor.astroweather_backyard_sun_altitude
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_sun_altitude'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: SUN NRIS
                        entity: sensor.astroweather_backyard_sun_next_rising
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_sun_next_rising'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: SUN NSET
                        entity: sensor.astroweather_backyard_sun_next_setting
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_sun_next_setting'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: NIGHT DUR
                        entity: >-
                          sensor.astroweather_backyard_astronomical_night_duration
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_astronomical_night_duration'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: N DARK NIG
                        entity: sensor.astroweather_backyard_moon_next_dark_night
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_next_dark_night'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TIME SHFT
                        entity: sensor.astroweather_backyard_time_shift
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_time_shift'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: FOG 2M
                        entity: sensor.astroweather_backyard_fog_2m_area
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_fog_2m_area'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                tabs4:
                  card:
                    type: horizontal-stack
                    cards:
                      - type: custom:button-card
                        name: LIEU
                        entity: sensor.astroweather_backyard_location_name
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_location_name'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: LATITUDE
                        entity: sensor.astroweather_backyard_latitude
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_latitude'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: LONGITUDE
                        entity: sensor.astroweather_backyard_longitude
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_longitude'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: ELEVATION
                        entity: sensor.astroweather_backyard_elevation
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_elevation'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: TIME STMP
                        entity: sensor.astroweather_backyard_timestamp
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_timestamp'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: MOON ICON
                        entity: sensor.astroweather_backyard_moon_icon
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_moon_icon'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: SET DARK
                        entity: >-
                          binary_sensor.astroweather_backyard_moon_sets_during_darkness
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['binary_sensor.astroweather_backyard_moon_sets_during_darkness'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: RISE DARK
                        entity: >-
                          binary_sensor.astroweather_backyard_moon_rises_during_darkness
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['binary_sensor.astroweather_backyard_moon_rises_during_darkness'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: ALWAYS DN
                        entity: >-
                          binary_sensor.astroweather_backyard_moon_always_down_during_darkness
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['binary_sensor.astroweather_backyard_moon_always_down_during_darkness'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: ALWAYS UP
                        entity: >-
                          binary_sensor.astroweather_backyard_moon_always_up_during_darkness
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['binary_sensor.astroweather_backyard_moon_always_up_during_darkness'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: LEV NAUT
                        entity: sensor.astroweather_backyard_sun_next_rising_nautical
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_sun_next_rising_nautical'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                      - type: custom:button-card
                        name: COU NAUT
                        entity: sensor.astroweather_backyard_sun_next_setting_nautical
                        show_icon: true
                        show_label: true
                        size: 20px
                        label: >-
                          [[[ return
                          states['sensor.astroweather_backyard_sun_next_setting_nautical'].state]]]
                        styles:
                          card:
                            - height: 35px
                            - border: 2px solid rgba(255, 255, 255, 0.5)
                            - border-radius: 6px
                            - padding: 4px
                          grid:
                            - grid-template-areas: "'i n' 'i l'"
                            - grid-template-columns: 30% 70%
                            - grid-template-rows: 1fr 1fr
                          icon:
                            - color: white
                            - justify-self: center
                          name:
                            - font-size: 11px
                            - font-weight: bold
                            - justify-self: start
                            - align-self: end
                          label:
                            - font-size: 11px
                            - color: white
                            - justify-self: start
                            - align-self: start
                R1:
                  card:
                    type: custom:button-card
                    name: MOON SIZE
                    entity: sensor.astroweather_backyard_moon_angular_size
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_moon_angular_size'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R11:
                  card:
                    type: custom:button-card
                    name: MOON DIST
                    entity: sensor.astroweather_backyard_moon_distance
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_moon_distance'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: "-9px !important"
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R2:
                  card:
                    type: custom:button-card
                    name: MOON RDST
                    entity: sensor.astroweather_backyard_moon_relative_distance
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_moon_relative_distance'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R12:
                  card:
                    type: custom:button-card
                    name: MOON REL
                    entity: sensor.astroweather_backyard_moon_relative_size
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_moon_relative_size'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: "-9px !important"
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R3:
                  card:
                    type: custom:button-card
                    name: SUN CONST
                    entity: sensor.astroweather_backyard_sun_constellation
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_sun_constellation'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R13:
                  card:
                    type: custom:button-card
                    name: SUN AZIM
                    entity: sensor.astroweather_backyard_sun_azimuth
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_sun_azimuth'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: "-9px !important"
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R4:
                  card:
                    type: custom:button-card
                    name: MOON AZIM
                    entity: sensor.astroweather_backyard_moon_azimuth
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_moon_azimuth'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
                R14:
                  card:
                    type: custom:button-card
                    name: MOON CONST
                    entity: sensor.astroweather_backyard_moon_constellation
                    show_icon: true
                    show_label: true
                    size: 20px
                    label: >-
                      [[[ return
                      states['sensor.astroweather_backyard_moon_constellation'].state]]]
                    styles:
                      card:
                        - height: 35px
                        - border: 2px solid rgba(255, 255, 255, 0.5)
                        - border-radius: 6px
                        - padding: 4px
                        - margin-left: "-9px !important"
                      grid:
                        - grid-template-areas: "'i n' 'i l'"
                        - grid-template-columns: 30% 70%
                        - grid-template-rows: 1fr 1fr
                      icon:
                        - color: white
                        - justify-self: center
                      name:
                        - font-size: 11px
                        - font-weight: bold
                        - justify-self: start
                        - align-self: end
                      label:
                        - font-size: 11px
                        - color: white
                        - justify-self: start
                        - align-self: start
        card_mod:
          style: |
            ha-card {
              background: rgba(0,0,0,0.1);
              backdrop-filter: blur(6px);
              -webkit-backdrop-filter: blur(6px);
              box-shadow: none;
              padding: 6px;
              border-radius: 8px;
            }
        style:
          top: 35%
          left: 50%
          width: 1350px

1

Edit: Ajout au survol en cours parce que c’est raccord avec tout ce que je fais :check_box_with_check:

1

on enchaine sur les dates dans les boutons

                        label: |-
                          [[[ 
                            var s = states['sensor.xxx'].state;
                            var date = new Date(s);
                            if (isNaN(date)) return s;

                            var day = ("0" + date.getDate()).slice(-2);
                            var month = ("0" + (date.getMonth() + 1)).slice(-2);
                            var hours = ("0" + date.getHours()).slice(-2);
                            var minutes = ("0" + date.getMinutes()).slice(-2);

                            return day + "/" + month + " " + hours + ":" + minutes;
                          ]]]

image

Tous les « labels » ont été revus, ajout des unités … reste les noms à revoir, parfois FR, parfois UK, parfois les deux, jvais tout remettre en UK parce que généralement c’est plus court

cdt

1 « J'aime »

Re,

Je suis en version finale, si il y a des changements à faire, c’est maintenant :slight_smile: après je passe aux templates

ajout d’une zone autour des boutons qui déclenchent le graph, du coup pour faire le rapprochement j’ai mis le tour du graph de la même couleur

Tous les labels sont revus, tous les noms sont revus > UK

appel à tous les « astros » dans le coin pour vérifier les noms et la cohérence de la carte :slight_smile: en vous remerciant

Une version telephone plus verticale et moins large verra sans doute le jour par la suite (là on est plutôt sur du picture element ou des dashboards de grande taille )

cdt

Re,

Bon voilà, je l’ai passé à la moulinette à template, 1 template qui tient compte des tous les formats remontés et les mises en forme des résultats, c’est le même pour tous les boutons., juste les variables qui changent, il est de fait très facile de déplacer un bouton sur la carte.

on passe de 3211 lignes de code

image

à 629 lignes + 106 de template

image

1

encore en test, mais je met un bout de code

Résumé
                type: custom:streamline-card
                template: bouton_astrocard
                variables:
                  - name: TEMP 2M
                  - entity: sensor.astroweather_backyard_2m_temperature
                  - suffix: °C
                  - active_option: Temp
                  - active_color: "#ff7675"

                type: custom:streamline-card
                template: bouton_astrocard
                variables:
                  - name: HUMID 2M
                  - entity: sensor.astroweather_backyard_2m_relative_humidity
                  - suffix: "%"
                  - margin_left: 9px !important
                  - active_option: Humidite
                  - active_color: "#9b59b6"

                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: LIFT INDX
                      - entity: sensor.astroweather_backyard_lifted_index
                      - suffix: °C
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: RAIN AMT
                      - entity: sensor.astroweather_backyard_precipitation_amount
                      - suffix: mm
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: DEEP TMRW
                      - entity: sensor.astroweather_backyard_deepsky_forecast_tomorrow
                      - suffix: "%"
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: DEPS TDAY
                      - entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_today_plain
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: DEPS TMRW
                      - entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_tomorrow_plain
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: LENGTH
                      - entity: sensor.astroweather_backyard_forecast_length
                      - suffix: h
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: LIFT PLIN
                      - entity: sensor.astroweather_backyard_lifted_index_plain
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: TRANS PLIN
                      - entity: sensor.astroweather_backyard_transparency_plain
                      - active_option: none
                  - type: custom:streamline-card
                    template: bouton_astrocard
                    variables:
                      - name: TDAY DESC
                      - entity: >-
                          sensor.astroweather_backyard_deepsky_forecast_today_description
                      - active_option: none

et le template

Template streamline
streamline_templates:
  bouton_astrocard:
    card:
      type: custom:button-card
      name: '[[name]]'
      entity: '[[entity]]'
      show_icon: true
      show_label: true
      size: 20px
      label: |
        [[[ 
          let s = states['[[entity]]'].state;
          let suffix = "[[suffix]]";
          if (suffix.includes('[[') || suffix === 'undefined') { suffix = ""; }

          // --- LOGIQUE D'AFFICHAGE ---

          // 1. Cas Math : Conversion Secondes -> Minutes (ex: ASTRO DUR)
          if ("[[math]]" === "min") {
            return Math.round(parseFloat(s) / 60) + " min";
          }

          // 2. Cas des icônes lune
          if ("[[entity]]".includes('moon_icon')) {
            let clean = s.replace('moon-', '').replace(/-/g, ' ');
            return clean.charAt(0).toUpperCase() + clean.slice(1);
          }

          // 3. Cas des dates (Soleil / Lune)
          if (s.includes('T') && s.includes(':')) {
            let date = new Date(s);
            if (!isNaN(date)) {
              let day = ("0" + date.getDate()).slice(-2);
              let month = ("0" + (date.getMonth() + 1)).slice(-2);
              let hours = ("0" + date.getHours()).slice(-2);
              let minutes = ("0" + date.getMinutes()).slice(-2);
              return day + "/" + month + " " + hours + ":" + minutes;
            }
          }

          // 4. Cas standard
          return s + suffix;
        ]]]
      styles:
        card:
          - height: 35px
          - border: 2px solid rgba(255, 255, 255, 0.8)
          - border-radius: 6px
          - padding: 4px
          - margin-left: >-
              [[[ return '[[margin_left]]' !== 'undefined' ? '[[margin_left]]' :
              '0px' ]]]
          - background: |
              [[[ 
                const activeOption = "[[active_option]]";
                if (activeOption && states['input_select.astroweather'].state === activeOption) {
                  return "[[active_color]]";
                }
                return 'rgba(255,255,255,0.1)';
              ]]]
          - transition: all 0.2s ease
        grid:
          - grid-template-areas: '''i n'' ''i l'''
          - grid-template-columns: 30% 70%
          - grid-template-rows: 1fr 1fr
        icon:
          - color: |
              [[[ 
                const activeOption = "[[active_option]]";
                return (activeOption && states['input_select.astroweather'].state === activeOption) ? 'black' : 'white';
              ]]]
          - justify-self: center
        name:
          - font-size: 11px
          - font-weight: bold
          - justify-self: start
          - align-self: end
          - color: |
              [[[ 
                const activeOption = "[[active_option]]";
                return (activeOption && states['input_select.astroweather'].state === activeOption) ? 'black' : 'white';
              ]]]
        label:
          - font-size: 11px
          - justify-self: start
          - align-self: start
          - color: |
              [[[ 
                const activeOption = "[[active_option]]";
                return (activeOption && states['input_select.astroweather'].state === activeOption) ? 'black' : 'white';
              ]]]
      tap_action:
        action: |
          [[[ 
            return ("[[active_option]]" !== "none" && "[[active_option]]" !== "undefined") ? "call-service" : "more-info";
          ]]]
        service: input_select.select_option
        service_data:
          entity_id: input_select.astroweather
          option: '[[active_option]]'
      extra_styles: |
        ha-card:hover {
          background: rgba(0, 123, 255, 0.4) !important;
          border-color: rgba(255, 255, 255, 1) !important;
          transform: scale(1.02) !important;
          cursor: pointer !important;
        }

cdt

2 « J'aime »

Re,

Pareil j’ai la structure, plus qu’à ajouter les boutons

cdt

2 « J'aime »