Timestamp can't show in IOS app, but working on chrome


#1

I have sensor for timestamp below. It working fine in Chrome, but shows Invalid date in IOS app. Is it a bug?

sensor rtl_433_WS4904P_t:
  • platform: mqtt
    name: “Time DSC Intrusion”
    state_topic: “RTL_433/DSC_Contact/3422441”
    device_class: timestamp
    icon: mdi:timer
    value_template: “{{ value_json.time }}”


#3

here is the screenshot on iphone


#4

I had similar with one of my sensors.

It appears the the app is more strict about the datetime format. If it is in the format “yyyy-mm-dd hh:mm:ss” it won’t work. Changing the format to “yyyy-mm-ddThh:mm:ss” (i.e. adding a “T” between the date and time) made it work.

If you can’t change the JSON you may be able to fix it in the value_template.


#5

Thanks @Steven_Rollason. the time format is from rtl_433 to mqtt without T. I am new to homeassistant. Do you know how to fix it in value_tempelate ?

Thanks in Advance.


#6

I finally change the time format to “yyyy-mm-ddThh:mm:ss”, but ios app still can’t show the correct information. there is 4 hours different. when I open the timestamp it shows 2 minutes ago, but it shows 4 hours ago in closed state. Please see the screenshot below. it looks like the timezone setting is wrong for the app.



#7


#8