I want to add an additional offset that it only triggers every x days not every day at the defined time.
To inputs i added:
days_interval:
name: Days between reminding
description: Amount of days till the next reminder
default: 3
selector:
number:
min: 1
max: 365
unit_of_measurement: days
step: 1
last_triggerd_time:
name: Dedicated helper last taken
description: Create and set here an input_datetime to handle the last reminder
selector:
entity:
domain:
- input_datetime
multiple: false
I created this variables (not sure if they are required, just found this as a -not working- solution somewhere):
If your input_datetime is date-only or date and time, then there should be no issue passing the state to as_timestamp()… However, a time-only input won’t work with that function. Post the whole error message.
If I understand your goal, this should be a condition not a trigger.
Error evaluating condition in ‘Pflanzen gießen’: In ‘condition’: In ‘template’ condition: ValueError: Template error: int got invalid input ‘unknown’ when rendering template ‘{% set days_between = (now() - states(last_watered) | as_datetime | as_local).days %} {{ days_between >= states(‘input_number.days_interval’) | int }}’ but no default was specified
The second solution throws
Template variable error: ‘last_watered’ is undefined when rendering ‘{% set days_between = (now() - states(last_watered) | as_datetime | as_local).days %} {{ (now() >= today_at(reminder_time_var) ) and (days_between >= states(‘input_number.days_interval’) | int ) }}’