Why isn't this relative_time template sensor updating?

sensor:
  - platform: template
    sensors:
      doorbell_rang:
        friendly_name: "Door Bell Rang:"
        value_template: "{{ relative_time(states.sensor.doorbell_mqtt.last_changed)}}"
  - platform: mqtt
    state_topic: "home/doorbell/reed"
    name: "doorbell_mqtt"
    force_update: true
    availability_topic: "home/doorbell/LWT"

image

in the template editor works just fine:

In the meantime

    value_template: '{{states.sensor.doorbell_mqtt.last_changed.strftime("%d/%m %H:%M") }}'

will have to do :slight_smile:

Im pretty sure that standard HASS behaviour is that your template sensor would only be re-evaluated if the state value of doorbell_mqtt sensor actually changed, therefore the 9 seconds you are seeing is the time elapsed between the last time this doorbell was pushed and when this sensor subsequently changed. It wont update till the doorbell is triggered again, and wont update more than once. You might be able to use a timed automation to achieve this instead?