Show when Switch was last turn on

Hey everyone,
right now I’m building the Irrigation System for my garden. I have two sprinklers that water the lawn based on rain forecast. As the forecast is not always correct, I want in my lovelace Dashboard to see when the sprinkler was last ON. The sprinklers are controlled with an Shelly like an regular switch. I can get ah Histoy Bar, but I’d like to have plain Text e.g. last watered: 3Hours ago
I tried to implement this in the Confuration.yaml in the Sensor colum:

  • platform: history_stats
    name: Beregnung Mitte
    entity_id: switch.regner_mitte
    state: “on”
    type: time
    end: “{{ now() }}”
    days: 5

am I on the right way? How do I get this Sensor shown up in the dashboard, I cant find ist as Sensor.
Maybe someone can Help
Thank you in advance

There are two options in this topic:

Wow, thank you very much for your quick help!!!