Skip to content

Instantly share code, notes, and snippets.

@MoritzBuetzer
Created November 13, 2020 13:17
Show Gist options
  • Save MoritzBuetzer/7ddf0c7313b58a54e93e8b872178d2bb to your computer and use it in GitHub Desktop.
Save MoritzBuetzer/7ddf0c7313b58a54e93e8b872178d2bb to your computer and use it in GitHub Desktop.
Get current Weekday in German – Home Assistant Template
{% set tage = ["Sonntag", "Montag", "Dìenstag", "Mìttwoch", "Donnerstag", "Freitag", "Samstag"] %}
{% set dayIndex = as_timestamp(state_attr('weather.basel','forecast').0.datetime) | timestamp_custom("%w") | int %}
{% set wochentag = tage[dayIndex] %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment