Dashboard Zeitangabe in Deutsch

Naben,

ich habe da ein Problem. Ich habe mein Dashboard endlich soweit fertig, was mein Monk aber richtig triggert, ist die Tatsache das ich in der Welcome Card, keine Deutsche Zeit bzw Datum integriert bekomme.

Kann mir da jemand helfen?

Anbei der Code:

type: vertical-stack
cards:
  - type: custom:mushroom-title-card
    title: |2-
                 {%- if now().hour < 12 -%}Guten Morgen
                 {%- elif now().hour < 18 -%}Guten Tag
                 {%- else -%}Guten Abend{%- endif -%}, {{user}}
    subtitle: >-
      {{as_timestamp(state_attr("calendar.bins","start_time") |
      default(now(),true) )| timestamp_custom('%A %-d. %B %Y, %H:%M') }}
    alignment: center
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-chips-card
        card_mod:
          style: |
            :host {
                padding-top: 10px;
                padding-left: 10px;
                padding-bottom: 25px;
              --ha-card-background: #1A1A1A;
            }
        chips:
          - type: action
            icon_color: orange
            entity: light.alles_aus
            tap_action:
              action: toggle
            icon: mdi:lightbulb-group
            hold_action:
              action: more-info
            double_tap_action:
              action: none
          - type: action
            icon_color: red
            entity: switch.fritz_box_7590_wi_fi_gez_meldewagen_50
            tap_action:
              action: more-info
            hold_action:
              action: toggle
            icon: mdi:wifi
          - type: action
            icon_color: red
            entity: switch.fritz_box_7590_wi_fi_gez_meldewagen_24
            tap_action:
              action: more-info
            hold_action:
              action: toggle
            icon: mdi:wifi
          - type: action
            icon_color: blue-grey
            entity: media_player.wohnzimmer
            icon: mdi:apple
            tap_action:
              action: more-info
          - type: action
            icon_color: blue
            hold_action:
              action: none
            double_tap_action:
              action: none
            icon: mdi:water
            entity: sensor.water_heaters
            tap_action:
              action: toggle
          - type: action
            icon_color: white
            icon: mdi:motion-sensor
            entity: switch.flur_motion_bewegungssensor_aktiviert
            hold_action:
              action: none
            double_tap_action:
              action: none
            tap_action:
              action: toggle
        alignment: justify
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-person-card
        entity: device_tracker.iphone_von_daniel_de_biasi
        name: Daniel
        fill_container: true
        icon: mdi:baby-face
        tap_action:
          action: more-info
        hold_action:
          action: none
        double_tap_action:
          action: none
        layout: horizontal
        secondary_info: state
        primary_info: name
        icon_type: icon
        card_mod:
          style: |
            :host {
              --ha-card-background: #1A1A1A;
            }
      - type: custom:mushroom-person-card
        entity: device_tracker.m2011k2g_2
        name: Vivien
        fill_container: true
        icon: mdi:face-woman
        tap_action:
          action: more-info
        hold_action:
          action: none
        double_tap_action:
          action: none
        card_mod:
          style: |
            :host {
              --ha-card-background: #1A1A1A;
            }
        layout: horizontal
grid_options:
  columns: 12
  rows: 4
card_mod:
  style: |
    ha-card {
      padding-left: 25px;
      padding-right: 25px;
      padding-bottom: 25px;
    }
    }

hier auch noch ein kleines problem, die Anwesendheitsbutton, würde ich gern ebenfalls noch in diesem iOS Glas haben. :slight_smile:

Ich habe mir einfach ein paar Sensoren gebastelt…

####################################################
#                                                  #
#     Boktor Döhners Datum_Zeit                    #
#                                                  #
####################################################
- sensor:
  - name: datum_zeit
    unique_id: 1aa4254d-69a0-4617-b41d-eba8b6ce814a
    icon: mdi:calendar-today
    state: >
      {% set months = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"] %}
      {% set days = ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"] %}
      {{ days[now().weekday()] + ', ' + now().day | string + '. ' + months[now().month-1] + ' ' + now().year | string }}

####################################################
#                                                  #
#     "Deutsches" Datumsformat                     #
#                                                  #
####################################################
- sensor:
  - name: date_formated_german
    unique_id: ee0c1a3f-0d8e-4f54-9f73-6c6fb4138f3b
    icon: mdi:calendar-today
    state: >
      {{ now().strftime('%d.%m.%y') }}

####################################################
#                                                  #
#     "Deutsches" Datumsformat mit Zeit            #
#                                                  #
####################################################
- sensor:
  - name: date_time_formated_german
    unique_id: 8809f9b2-922e-4b43-b152-10e8caec4eed
    icon: mdi:calendar-today
    state: >
      {{ now().strftime('%d.%m.%y / %H:%M') }}

####################################################
#                                                  #
#     "Deutsches" Zeitformat.                      #
#                                                  #
####################################################
- sensor:
  - name: time_formated_german
    unique_id: 38acdf72-c0c4-4e83-8749-33de898eca4b
    icon: mdi:clock-outline
    state: >
      {{ now().strftime('%H:%M') }}       

oder so:

{{ ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"][now().weekday()] }} {{ now().day }}. {{ ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"][now().month - 1] }} {{ now().year }}, {{ now().strftime('%H:%M') }}

ergibt: Dienstag 5. Februar 2025, 20:46

ok, das sind Lösungen die habe ich bereits auch im netz gefunden, jedoch habe ich keine Ahnung wo dieses hin kopiert werden soll. den wenn ich es in dem oberen code einfüge, wird es mir dennoch in englisch angezeigt. :slight_smile:

Das muss in Deine TEMPLATE.YAML.

die habe ich nicht. oO

Dann hast Du wohl noch alles in der CONFIGURATION.YAML stehen und hast es nicht aufgeteilt. Dann muss es da rein.

mein Code kannst Du in der custom:mushroom-title-card in den Subtitle kopieren, das war’s dann schon. Klappt bei mir mit Deiner Karte sofort.

type: vertical-stack
cards:
  - type: custom:mushroom-title-card
    title: |2-
                 {%- if now().hour < 12 -%}Guten Morgen
                 {%- elif now().hour < 18 -%}Guten Tag
                 {%- else -%}Guten Abend{%- endif -%}, {{user}}
    subtitle: >-
      {{ ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"][now().weekday()] }} {{ now().day }}. {{ ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"][now().month - 1] }} {{ now().year }}, {{ now().strftime('%H:%M') }}
    alignment: center
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-chips-card
        card_mod:
          style: |
            :host {
                padding-top: 10px;
                padding-left: 10px;
                padding-bottom: 25px;
              --ha-card-background: #1A1A1A;
            }
        chips:
          - type: action
            icon_color: orange
            entity: light.alles_aus
            tap_action:
              action: toggle
            icon: mdi:lightbulb-group
            hold_action:
              action: more-info
            double_tap_action:
              action: none
          - type: action
            icon_color: red
            entity: switch.fritz_box_7590_wi_fi_gez_meldewagen_50
            tap_action:
              action: more-info
            hold_action:
              action: toggle
            icon: mdi:wifi
          - type: action
            icon_color: red
            entity: switch.fritz_box_7590_wi_fi_gez_meldewagen_24
            tap_action:
              action: more-info
            hold_action:
              action: toggle
            icon: mdi:wifi
          - type: action
            icon_color: blue-grey
            entity: media_player.wohnzimmer
            icon: mdi:apple
            tap_action:
              action: more-info
          - type: action
            icon_color: blue
            hold_action:
              action: none
            double_tap_action:
              action: none
            icon: mdi:water
            entity: sensor.water_heaters
            tap_action:
              action: toggle
          - type: action
            icon_color: white
            icon: mdi:motion-sensor
            entity: switch.flur_motion_bewegungssensor_aktiviert
            hold_action:
              action: none
            double_tap_action:
              action: none
            tap_action:
              action: toggle
        alignment: justify
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-person-card
        entity: device_tracker.iphone_von_daniel_de_biasi
        name: Daniel
        fill_container: true
        icon: mdi:baby-face
        tap_action:
          action: more-info
        hold_action:
          action: none
        double_tap_action:
          action: none
        layout: horizontal
        secondary_info: state
        primary_info: name
        icon_type: icon
        card_mod:
          style: |
            :host {
              --ha-card-background: #1A1A1A;
            }
      - type: custom:mushroom-person-card
        entity: device_tracker.m2011k2g_2
        name: Vivien
        fill_container: true
        icon: mdi:face-woman
        tap_action:
          action: more-info
        hold_action:
          action: none
        double_tap_action:
          action: none
        card_mod:
          style: |
            :host {
              --ha-card-background: #1A1A1A;
            }
        layout: horizontal
grid_options:
  columns: 12
  rows: 4
card_mod:
  style: |
    ha-card {
      padding-left: 25px;
      padding-right: 25px;
      padding-bottom: 25px;
    }
    }

Vielen Dank, das hat geklappt. Danke, Danke, Danke! :slight_smile:

1 „Gefällt mir“