pkissling / clock-weather-card

A Home Assistant Card indicating today's date/time, along with an iOS inspired weather forecast for the next days with animated icons
Other
399 stars 78 forks source link

Ability to set a time zone #197

Closed dhilbig closed 12 months ago

dhilbig commented 1 year ago

Is your feature request related to a problem? Please describe. When using a weather feed from a different time zone the time can only be linked to the browser or the HA servers time.

Describe the solution you'd like I would like to be able to set a "time_zone:" parameter when I am using a card displaying the weather from a different time zone. This would allow the card to display the time, adjust the transition to the next day to match that of the forecast's origin and display the time zone sun / moon icons.

Additional context As I live in Australia but have family living in Germany, I currently collect forecast data from the Australian Government's Bureau of Meteorology to display my local forecasts and Deutscher Wetterdienst for Germany's.

pkissling commented 1 year ago

might be done as proposed by @dhilbig or as proposed in #180

pkissling commented 1 year ago

hey there, i just released a beta 2.0.0 which adds the functionality to provide a custom time_zone. please carefully read the changelog. there are some breaking changes, which might require your attention.

pkissling commented 12 months ago

released 2.0.0

untaught-mint-contact commented 10 months ago

Hello, Looking for assistance with getting the time_zone setting working. The card config below results in showing my local date/time instead of US/Eastern. I look forward to any help. Thank you.

type: custom:clock-weather-card entity: weather.ksgj_daynight title: St. Augustine sun_entity: sun.sun temperature_sensor: sensor.outdoor_temp weather_icon_type: line animated_icon: true forecast_rows: 5 locale: en-US time_pattern: H:mm time_format: 12 date_pattern: M/d/yyyy hide_today_section: false hide_forecast_section: false hide_clock: false hide_date: false hourly_forecast: false use_browser_time: false time_zone: US/Eastern state_color: true

pkissling commented 10 months ago

Hello, Looking for assistance with getting the time_zone setting working. The card config below results in showing my local date/time instead of US/Eastern. I look forward to any help. Thank you.

type: custom:clock-weather-card entity: weather.ksgj_daynight title: St. Augustine sun_entity: sun.sun temperature_sensor: sensor.outdoor_temp weather_icon_type: line animated_icon: true forecast_rows: 5 locale: en-US time_pattern: H:mm time_format: 12 date_pattern: M/d/yyyy hide_today_section: false hide_forecast_section: false hide_clock: false hide_date: false hourly_forecast: false use_browser_time: false time_zone: US/Eastern state_color: true

the config you provided works for me. my local time is 21:42

image
untaught-mint-contact commented 10 months ago

Interesting. Well thank you.