Hello
I’ve been working on this quite a while, but cannot get the automation working.
I have a calendar, where I track my garbage collection, and it works like a charm. I even have a card showing the status of each of the garbage type my town handles.
Now I want to go one step further, I want it to notify in my mobile the day before, and that does not work.
This is my basic condition:
'{{ (( as_timestamp(state_attr(''calendar.braun'', ''start_time'')) - as_timestamp(now())) | timestamp_custom(''%d'') )|int <= 1 }} '
I’ve used it as a condition (with trigger at a fixed time) and as a trigger and it does not work (the template returns true when evaluated on the devs tools)
As of now my automation is:
- id: '1567616886630'
alias: Orgánica (Braun)
trigger:
- platform: template
value_template: '{{ (( as_timestamp(state_attr(''calendar.braun'', ''start_time'')) - as_timestamp(now())) | timestamp_custom(''%d'') )|int <= 1 }} '
condition: []
action:
- data:
message: Sacar el orgánico (marrón) {{ as_timestamp(state_attr('calendar.braun',
'start_time')) | timestamp_custom('%d.%m') }}
title: Sacar la basura
service: notify.mobile_app_alejandro_note
I call the notify part, and it works. I evaluate the template and returns true. Can anybody help me?
Thanks!