I have a timer based switch at the moment the kids can toggle which turns the TV on for a set amount of time. What I want to do is have a list of chores that need to be completed before they watch TV and then the switch becomes available to toggle. Ideally this would be a set list every day but possibly hooked into my working caldav binding so we can set different chores for different days
I’d like them to appear on a habpanel as some form of switch
Anyone got any ideas how to get this started?
You will need a Switch Item for each core I think. She’s Habpanel support Groups the same way sitemap do? If so I’d put the Group on the sitemap and then dynamically create items and add them to the Group from a rule. You will need to do this through the REST API.
If you can’t do it with Groups, then you will need to precreate the Items and just populate them with the data from the calendar. You should still use a Group to calculate whether or not all of them are checked.
Yes groups are supported I think I will try and get working in basicui first then I can translate.
So you mentioned dynamically creating - is the idea for this to be done from a calendar? If so have you seen an article that will get me started?
What is the syntax that determines a group is all ON or is this a loop through each group item every time one of them changes?
OK i think I might skip the whole dynamic thing for now to ensure I have a use case.
I am now looking to do the following:
Have 3 switches in a group - once all three switches are ON, then the group switch is set to ON - I can see how to do the reverse of this where the group switch controls the members to ON but not the reverse?
I don’t use the CalDav binding so don’t know how feasible this is. But yes, d have an item get populated with all of the chores for the day for each person. From a rule I’d parse that list and using the REST API is create a Switch Item to represent each chore, adding the Item to the correct Group so it gets displayed.
I’ve seen it talked about so I know it’s possible but I’ve not seen a tutorial that I can recall. You might search the forum though. If you figure this out a tutorial would be most welcome.
Group:Switch:AND(ON, OFF) Chores
The AND part means if all members are ON the Group’s state will be on.