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?