Yeah, this method won’t work for seconds. But then again, even if we add templates to seconds, it still won’t work for seconds because there’s nothing in templates that automatically creates a per-second resolution.
I still cannot get past this. My automation won’t run based on the input I set:
blueprint:
name: Time Pattern Notification
description: Sends a notification at a variable time interval defined within the blueprint.
domain: automation
input:
time_interval_minutes:
name: Time Interval (minutes)
description: The interval in minutes for the notification to trigger.
default: 15
selector:
number:
min: 1
max: 60
unit_of_measurement: minutes
target_device:
name: Target iPhone Device
description: The mobile device to send the notification to.
selector:
device:
integration: mobile_app
trigger_variables:
interval: !input time_interval_minutes
trigger:
- platform: template
value_template: "{{ now().minute % states(interval) | int }}"
actions:
- data:
message: test
action: notify.mobile_app_iphone_X
Still doesn’t trigger, this is the blueprint code:
blueprint:
name: Time Pattern Notification
description: Sends a notification at a variable time interval defined within the blueprint.
domain: automation
input:
time_interval_minutes:
name: Time Interval (minutes)
description: The interval in minutes for the notification to trigger.
default: 15
selector:
number:
min: 1
max: 60
unit_of_measurement: minutes
target_device:
name: Target iPhone Device
description: The mobile device to send the notification to.
selector:
device:
integration: mobile_app
trigger_variables:
interval: !input time_interval_minutes
trigger:
- platform: template
value_template: "{{ now().minute % interval }}"
actions:
- data:
message: test
action: notify.mobile_app_iphone_di_filippo
time_interval_minutes is of course declared at the beginning of the blueprint:
input:
time_interval_minutes:
name: Time Interval (minutes)
description: The interval in minutes for the automation to trigger
default: 15
selector:
number:
min: 1
max: 60
unit_of_measurement: minutes