How do trigger-based template sensors work?

Ok couple of issue I can see straight away.

You have defined a time trigger and separate sensors but the two are not linked, look at the sample from the documents:

template:
  - trigger:
      - platform: time_pattern
        # This will update every night
        hours: 0
        minutes: 0
    sensor:
      # Keep track how many days have past since a date
      - name: "Not smoking"
        state: 

Then look at yours:

Also you state in your post you want every 5 mins but then have put in your yaml every 5 hours, which is it you want ?

3 Likes