Thanks a lot, It’s really good idea and from now I am using it with tts service. By the way here is a more accurate way to calculate the age.
{% set yearDiff = now().strftime("%Y") | int - 1976 %}
{% set monthDiff = now().strftime("%m") | int - 11 %}
{% set dayDiff = now().strftime("%d") | int - 04 %}
{% if dayDiff < 0 or monthDiff < 0 %}
{% set age = yearDiff - 1 %}
{% else %}
{% set age = yearDiff %}
{% endif %}
I may be missing something, but is there a way to define a local resource instead of a link to a github resource? resource: https://raw.githubusercontent.com/SilvrrGIT/HomeAssistant/master/json_data/days.json
For some reason, I am not grasping that part. Also I would like to duplicate it to make a list of Fun & Wacky Holidays.
@silvrr . Or anyone else that would have this Holiday/Birthday notification working.
Could anyone point me in the right direction to grab from a local file instead? I am surely not doing this right, but haven’t found anything on the board that could help.
Currently I have a file called holidays.json in my www directory under a subdirectory called DataFiles so: www/DataFiles/holidays.json
The command works for a hassio install. If you used another install method you may need to tweak that path. Put the days.json file in your config directory (same location as configuration.yaml)