I have a custom integration that creates an entity with an attribute, “next_due_date”, which uses a python date object as its value. When I log the value, the console shows the date correctly. However, in the UI it shows the date as one day earlier. For instance, if the date logged (which is correct) is 2023-04-10, the Home Assistant UI shows it as “April 9, 2023”.
I assume something is causing the date to include a time component at midnight, and that my timezone is causing it to subtract 4 hours. But the object I’m passing in is already a date which does not include a time component. Is there some way I can indicate that the attribute value should be treated as a date without any timezone conversion happening?