Hi,
I’m sending both timestamp sensor entities and a date sensor entity to HASS via MQTT. The timestamp entity works fine but the date one fails as HASS indicates that a time zone is required. I may have a misunderstanding of what a sensor date device class is for … or ?
The error I see in the HASS log is:
Value error while updating state of sensor.net2hassmqtt_test_device_05_timestamp_date_only, topic: 'net2hassmqtt_test_app_1/net2hassmqtt_test_device_05/timestamp_date_only' with payload: b'{\r\n "attributes": {},\r\n "state": "2026-12-31"\r\n}': Invalid datetime: sensor.net2hassmqtt_test_device_05_timestamp_date_only provides state '2026-12-31 00:00:00', which is missing timezone information
Seems clear … it wants a timezone. Thing is I do not understand how a timezone would relate to a date. A timestamp sure (and very good), but a date? If I send it as midnight in one timezone and the HASS system is in another time zone it is “possible” that the displayed date would change. What is the purpose of the date device class?
I appreciate guidance. Thx.