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

Template won't trigger automation

$
0
0

@koenhaemels wrote:

Hi There,

I’ve added a custom sensor that return the dusk time.
I’m using this sensor to trigger my automation to close the blinds.
But i’ve tried several templates forms to try to trigger the automation, but with no succes.
Is the output from the sensor wrong to trigger an automation?
The output is for example:

2020-03-14T19:19:56+01:00

Automation:

- id: '1575148683669'
  alias: 'Blinds: Close blinds'
  description: Close blinds at dusk
  trigger:
  - platform: template
    value_template: '{{ as_timestamp(now()) == as_timestamp(states.sensor.dusk.state)
      }}'
  condition: []
  action:
  - data:
      entity_id:
      - cover.ikea_tradfri_kadrilj_links
      - cover.ikea_tradfri_kadrilj_rechts
    service: cover.close_cover
  - data:
      message: Blinds are closing at {{ now().strftime('%H:%M') }}
      title: Blinds
    service: notify.mobile_app_iphone_van_koen

Anyone can inform me?

Many thanks!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles



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