Use a Trigger-based Template Sensor.
For future reference, you should post the configuration of your Template Sensor so we have more information about how you designed it.
See guideline 11 in the FAQ:
Use a Trigger-based Template Sensor.
For future reference, you should post the configuration of your Template Sensor so we have more information about how you designed it.
See guideline 11 in the FAQ: