Current date and time intents #2305
Replies: 7 comments 12 replies
-
Why don't we expose a proper localization method as a Jinja filter? Or at least pass the date/time as an already formatted string based on the request's language. This approach feels half-baked and is one more of those things upon which we will stumble later, IMHO. 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
Should we include the weekday as well? |
Beta Was this translation helpful? Give feedback.
-
Done for French #2306 (comment) |
Beta Was this translation helpful? Give feedback.
-
Done for Spanish #2311 |
Beta Was this translation helpful? Give feedback.
-
… ________________________________
From: David Marín ***@***.***>
Sent: Friday, July 12, 2024 5:43:09 AM
To: home-assistant/intents ***@***.***>
Cc: Steve Wong ***@***.***>; Team mention ***@***.***>
Subject: Re: [home-assistant/intents] Current date and time intents (Discussion #2305)
Done for Spanish #2311<#2311>
—
Reply to this email directly, view it on GitHub<#2305 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGG7JKYQXT6TQ4VFSH5AZLZL7FN3AVCNFSM6AAAAABKXD6I2SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBTGE2TCMI>.
You are receiving this because you are on a team that was mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Done for German #2314 |
Beta Was this translation helpful? Give feedback.
-
Done for PT: #2374 |
Beta Was this translation helpful? Give feedback.
-
Hi @home-assistant/language-leaders 👋
There are two new basic intents that will be available in the next version of HA:
HassGetCurrentDate
slots.date
HassGetCurrentTime
slots.time
It's important that you do not use strftime in the response! This will format dates/times according to the locale of the machine HA is running on, not the locale of the intent.
For the English date response, I just hard-coded the month names and day ordinals (1st, 2nd, etc.). Dealing with locales in standard Python is more trouble than it's worth for these intents 😄
Beta Was this translation helpful? Give feedback.
All reactions