Closed stu1811 closed 2 years ago
Did you try using the include blueprint?
HA Core throws an error stating it cannot store an entity with more then 255 character
Ok. There is nothing I can do about the HA limit. So you probably need to make the list shorter. Unless you find some logic in the dates and can fix it with some exceptions.
Do you know if you can you use multiple blueprints simultaneously? ie split the txt file in half and read from both?
Is there a template to set multiple rules? ie every week for May, June, Oct, Nov and every other July, Aug, Sept?
You can either create own automation to add dates from multiple lists sequentially. There is no such template. Or you can use different entities and then merge them with a group type.
One follow-up question. I cut my date list in half for now and I'm trying to use the import text bluerprint but I cannot select the command line templte.
sensor:
- platform: command_line
command: "cat /share/yard_waste.txt"
name: yard_waste_pickup
Not sure why is that. The import selector uses a comand_line integration, so that should work IMHO. You can remove the integration specification from the blueprint. Then it will show all entities.
That worked. Thanks.
@bruxy70 I came up with a new solution. Cat the file, remove any dates older than today, and echo the 20 newest dates. I created a script in share with following and called the script from my configuration.yaml.
#!/bin/bash
new_dates=$(for x in $(cat /share/import_dates.txt); do
if [[ $(date -d $x +"%y%m%d") -ge $(date +"%y%m%d") ]]; then
echo $x
fi
done)
echo "$new_dates" | head -n20
This is excellent. Thank you. Will add that to the documentation
Before you submit a new bug report, please check that
Write your question here
My town has yard pickup. In May, June, Sept, and Oct it's every week. The rest of the summer it's every other week. My thought was to use the input file but it exceeds 255 character. Any suggestions?