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
420 stars 79 forks source link

How to implement Ordinal date so 1st, 2nd, 5th, 22nd etc. #283

Open dopeytree opened 11 months ago

dopeytree commented 11 months ago

Is your feature request related to a problem? Please describe.

I found some code but its creating a sensor so not sure how I would call that to override the date available by the card?

Also seem to be missing the dot for current temperature when using the full example? Describe the solution you'd like

Describe alternatives you've considered

Could just import an already formatted data sensor

Additional context

I'm Brittish 🇬🇧 & there's nothing cooler than having something display it nicley so Friday, November 24th 2023 the closest I can find on the https://moment.github.io/luxon/#/formatting?id=table-of-tokens format is Friday November 26, 2023

type: custom:clock-weather-card
entity: weather.tomorrow_io_home_daily
sun_entity: sun.sun
temperature_sensor: sensor.1_garden_temperature
weather_icon_type: line
animated_icon: true
forecast_rows: 7
locale: en-GB
time_format: 12
date_pattern: cccc, LLLL d - yyyy
hide_today_section: false
hide_forecast_section: false
hide_clock: false
hide_date: false
hourly_forecast: true
use_browser_time: false
time_zone: europe/london
Screenshot 2023-11-24 at 16 12 45
pkissling commented 11 months ago

unfortunately Luxon does not support ordinal formatting https://github.com/moment/luxon/issues/118 neither does clock-weather-card support dates provided by sensors. i will consider this a feature request for clock-weather-card to accept dates from sensors