You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am trying to use automations plus this great HACS integration to manage items on my to-do lists.
I thought it would be as simple as:
due_date: {{ states('sensor.<place_name>_brown_bin_next_collection_date') }}
However that returns
Not a parseable type for dictionary value @ data['due_date']. Got None
.If I use
states('sensor.<place_name>_brown_bin_next_collection_date')
in the template section of HA developer tools it does output a date, notNone
.I've tried many combinations of states and attributes to try to get this working but nothing sticks.
The only solution I have found is this:
{{ (now() + timedelta(days=(states('sensor.barnwell_road_brown_bin_days_until_collection') | int(0)))).strftime('%Y-%m-%d') }}
This will put the correct due_date in my to-do list task but it feels overly complicated given the data that is available in the entities.
Any ideas for a simpler solution are much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions