Please consider donating if this saves you time so that I can continue to deliver tutorials for you. Here you can download the code that I used for the template in the video How to create Action Template Sensors in Home Assistant. You can simply copy and paste this code so that you do not have to type it yourself. You get lifetime updates with this purchase. UPDATES: ======== V1.2 Changed template code so that it works with Home Assistant 2023.12. Use this version if you have Home Assistant 2023.12 installed. Use v1.0 if you use Home Assistant before version 2023.12 Thank you!