Hello,
I am trying to set up a visual reminder in lovelace using an input boolean toggled by a button. what i am having difficulty with is showing the “last” time it was changed and then showing the “next” date.
I currently have it somewhat sorted out in that I created two input_datetime “helpers” these being:
-
input_datetime.fish_fed_last — date only
-
input_datetime.next_fish_feed — date only
I am using a couple automations to set the various dates.
to set the “Fish_fed_last” which seems to be working.
alias: fish_last_fed
description: ''
trigger:
- platform: state
entity_id: input_boolean.feed_fish
from: 'on'
to: 'off'
condition: []
action:
- service: input_datetime.set_datetime
data:
date: '{{ (as_timestamp(now()) | timestamp_custom("%Y-%m-%d", true)) }}'
entity_id: input_datetime.fish_feed_last
mode: single
however, to set the “next_fish_feed” I cannot seem to get this to work. no mater what I seem to try the date is never updated. I am trying to set “next_fish_feed” to be 3 days in the future. So when the input boolean is togged to off, it would then have “next_fish_feed” show 3 days into the future.
I think I am close I just cannot seem to get this last bit worked out.
If anyone has any suggestions, it would be greatly appreciated.
Thanks - Chris