Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95468

Time_stamp and 1 hour before

$
0
0

@poudenes wrote:

Hi ALl,

Im testing a new automation. But im little confuses. The value is good. But cant understand how to let it work.

I want 1 hour before the start_time a notification. I thought this was the script how to work…

for example start time is: 14:00 so when I do -3600 is 1 hour then I get a “true” right?

But with this automation I get every hour a notification also when its more then 1 hour before the time.

- alias: "Notification - Goto Work"
  trigger:

    platform: time_pattern
    minutes: "/1"
      
  condition:
    condition: template
    value_template: "{{ as_timestamp(now()) | int < (as_timestamp(states.calendar.werk.attributes.start_time)-3600) | int }}"

  action:
    service: script.pushover_engine
    data_template:
      message: "Met een uur moet je naar je werk"
      priority: "0"
      sound: "bike"
      title: "HA Wwerken"

Posts: 8

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>