#im using content div div div bin dates
1 messages · Page 1 of 1 (latest)
Using
{% set text = states.sensor.blackbin.state %}
{{ text.split(', ')[-1].strip() if ',' in text else text.strip() }}
in the dev tools template editor give me the date portion as a string, not sure how to convert that to a date for use in the HA calendar
You can use #templates-archived to turn the string into a date
https://www.home-assistant.io/docs/configuration/templating/#time
That said, HA doesn't have a built in calendar, it uses external calendar services
https://www.home-assistant.io/integrations#calendar
yes, thats what Im struggling with - i need to put this in a value template on the sensor, so Im struggling with storing the output of the text.split as a value so I can then convert it.
there are 3 steps, the scrape pulls back a long sting, with the date after a comma as a string, then I need to split this string to grab the date portion, then convert it to a date value