Is it possible for HA to notify me that a smart plug is on after a predetermined time.
Such as
Garage Heater smart plug is on
At 9pm I would like a notification to let me know that i have left the heater on.
I dont want to turn it off, i just would like a notification.
I have tried the automation in HA
Time 21:00:00

Entity smart switch
State on

Call service

Persistent notifaction create

You have to do it something like this:

  - id: 'whatever'
    alias: '[Notify] Garage Smart plug is still on'
      - platform: time
        at: '21:00:00'
      condition: state
      entity_id: switch.your_smart_plug
      state: 'on'        
       - service: (here you have to put your notify component, i use HaNotify for Android)
           title: "Garage Smart Plug is still on"
           message: "Your garage smart plug is on. It was turned on at {{ states.switch.your_smart_plug.last_updated }}." 

You have to replace your smart plug entity id and you can modify your title and message whatever you want. It is nice to include in your message also the date when it was turned on (as you can see, there is a last_updated attribute call included by me)

Hope that it is what you were looking for.

Hey there thanks so much for the reply that’s pretty much what I had already tried to do for some reason I had no notifications I will try it again and copy exactly your code thanks for the quick reply

What if you will trigger automation manually?
Something in logs?

In the history its said it was triggered manually but i cannot find the log file.
I am using Ubuntu Server 18.04 LTS and HA is in docker. My config file is in usr/share/hassio/homeassistant

Tap “i” on the left panel (at the bottom right)

Ok, i think there is something with your service. Did you set up notifications?

I am trying right now to setup hanotify but i dont know wher or how i get my api password for home assistant

Fine. You have to make notifications work at first.
Try this

  - service: persistent_notification.create
      title: Bla bla
      message: la bla

Yes i can do that

Got all of that bit working… i now get a card on the screen to say that i habe left the heater on… just need to get the api for my home assistant and url so that i can use the android app

Hay thanks heaps for all you help … I finally got it working on the phone

1 Like