I am looking for suggestions on how to record daily habits in HA. What I want to do is track daily events such as medication, exercise etc with historical records. For viewing the historical records I am thinking a weekly view of what days the task was complete.
One option I considered was Google Calendar. I have setup G.C as a sensor for HA (works really well), but can’t see any way to add to the calendar. The other issue with using Google Calendar is the problem with displaying history. Afaik the only way to do it is by making the calendar public and embedding an iframe… which doesn’t work for me privacy wise.
Any suggestions on how I could possibly do this are appreciated.
It’s integrating RPG stats but not the tasks, I thought you look for task integration like task list which syncs with online service, this I haven’t seen yet
With a little programming, you could create a python script that you execute through a command shell in HA. It looks like google calendar api is fairly straightforward and well documented. The script could take a date / time and event name as inputs and put them into your calendar.
For anyone else looking at this, the authentication with the Google API can be a bit hairy. It uses OAuth which requires user input and provides an access token and refresh token, and you have to periodically trade the refresh token for a new access token. You also have to make an “app” in the google console (which we are used to doing by now), and here’s the kicker, while in development mode, the refresh tokens expire after like 15 pr 50 refreshes or something, meaning your app will have to prompt you to reauth periodically.