2 users complete task daily but it switches between the 2 users at end of week, continues forever #221
|
I have 2 users that I want to assign the same task they needs completed every day, but only 1 user completes it in the week. At the end if the week it switches to the other user. Can i do that in choreops? I want it to re occure for along time. |
Replies: 1 comment 2 replies
|
I think you mean a Primary & Standby chore, where two users are assigned and one is the active primary at a time. In ChoreOps, the OpsCenter admin view already lets you manage the primary and standby assigned user manually. This lets you move the primary to standby or vice-versa. The underlying services used in the dashboard are:
You can use the OpsCenter view to manually switch the primary and standby users as mentioned above. If you want it to switch automatically every week, you can add a Home Assistant automation or script that calls one of those services on a schedule to change your primary each week. alias: Swap Chore Primary Weekly
description: Swap John and Mary on a weekly schedule
triggers:
- trigger: time
at: "00:00:00"
conditions:
- condition: time
weekday:
- mon
actions:
- service: choreops.update_chore
data:
name: Daily Chore
assigned_user_names:
- Mary
- John
assignment_action: replace
mode: singleIf you want the next week to swap them back, use the same automation but flip the order to: assigned_user_names:
- John
- MaryYou could also create a version that toggles automatically every week with one helper instead of two separate automations, but this should get you pointed in the right direction. Docs:
|
I think you mean a Primary & Standby chore, where two users are assigned and one is the active primary at a time.
In ChoreOps, the OpsCenter admin view already lets you manage the primary and standby assigned user manually. This lets you move the primary to standby or vice-versa. The underlying services used in the dashboard are:
choreops.update_chorewith the assigned users reordered, which essentially changes who is primary (Note the first user in the list is the assigned primary with responsibility for the chore completion)choreops.set_rotation_turnto set the current turn to a specific user (temporary assignment until next completion/approval reset)choreops.open_rotation_cycleto t…