I made a python script that push entities with there attributes via a MQTT integration. I have attributes that display a date and I’m having issue with the formatting.
If I publish a date in the format YYYY-mm-dd (ex: 2023-08-30) it gets displayed in HA as August 29, 2023. Yes, a day earlier! It is not a typo.
If I publish a date in the format YYYY-mm-ddTHH:MM:SSz (ex: 2023-08-30T00:00:00-0400) it gets displayed in HA as August 30, 2023 at 00:00:00. Which is good.
In some cases I want the full date and time, so option #2 is perfect, but in some other cases I only want the date to be displayed without the extra <at 00:00:00> and the correct date value.
Is there a way to publish a date only string and get it displayed in HA?
I tried differente time zone from the configuration of HA frontend, and I’m still getting the 1 day offset with attributes published with a simple date format ‘YYYY-mm-dd’. I will try to publish them with a datetime or date object and see what happen.Thanks.