Hi!
I’m quite new to Home Assistant, and i’m trying to convert a task system that my wife and i use at home.
Long story first: (scroll down for my actual question)
Currently it is in google sheets, and it consists of a matrix that works like this:
- X-axis: Day of the year (1-365)
- Y-axis: A list of all tasks available.
- The cells in the matrix are one of three options: Done by me, Done by my wife or Not Done.
So basically it’s historical data of who did what on which day.
Each task also is assigned some parameters like:
- Diamond Reward: To keep it short, we have our own reward system for chores around the house and each task rewards a specific diamond value depending on time and how much it sucks to do. (It’s a pretty static value, but would be nice to be able to update it easily)
- Days Since: Based on the data from the matrix, how many days ago was this task done by anyone?
- Frequency: How frequent should this task be done? (in days)
- Due: Just Frequency minus Days Since to show how close it is to being due.
I want to create a dashboard that shows overdue tasks and also enables us to tap on a task button to mark it as Done by me or her.
My idea is to have an input_select for each task that have the three options, Done by Me, Done by Her, or Not Done. This helper defines whether it was done today.
Here is a quick draft of how such a card may look
Next stop is to make an automation that runs after midnight every day, that takes this data and stores it somewhere. I have yet to figure out where to do it, but i’m guessing it could be done in HA internally instead of some external database? HA logs every state change, i just need to find out how to access that to calculate our diamond balances and so on.
What i have tried so far:
- defining select_inputs in YAML: I’ve managed to bulk import all the tasks from my Google sheet to a YAML that looks like this:
dq_generelt_lav_mad:
name: Lav mad
options: !include dq_helpers_options.yaml
initial: 0
dq_generelt_tag_opvasken:
name: Tag opvasken
options: !include dq_helpers_options.yaml
initial: 0
dq_generelt_lav_proteinbars:
name: Lav proteinbars
options: !include dq_helpers_options.yaml
initial: 0
"...Remaining 100+ tasks..."
Getting to the point:
My problem is now that if i want to assign custom attributes to them like Diamond Reward , i don’t see what else i can do than add custom attributes in customize.yaml. Problem is that these attributes are then static and will be pretty much useless.
Creating them as dynamic helpers instead of YAML also won’t work since attributes still have to be added in customize.YAML making the attribute static.
I have considered making helper entities for every task for every variable, so something like this:
- input_select.task_1
- input_number.task_1_diamond_reward
- input_number.task_1_frequency
- input_number.task_1_due
- input_select.task_2
- input_number.task_2_diamond_reward
- etc…
Well since i have over 100 tasks, this is over 400 helper entities. It doesn’t feel right…
Is the right solution something with templates or virtual sensors or something? That’s an area i don’t quite understand even after looking through the documentation.
I’m a huge noob and i’m sure i am completely off the mark on how to achieve this. Feel free to educate me.
TLDR:
Is it possible to assign attributes to an entity that can be dynamically updated instead of being static? Is this the wrong way to set up a task management system?