185 files

This commit is contained in:
Home Assistant Version Control
2026-08-19 11:38:13 +00:00
parent 5f9330abd7
commit a718af6423
185 changed files with 16868 additions and 3088 deletions
+39 -253
View File
@@ -35,6 +35,22 @@ TEMPLATE_CHORE_FIELDS = (
_WEEKDAYS = ["monday", "tuesday", "wednesday", "thursday", "friday"]
_WEEKENDS = ["saturday", "sunday"]
def _chore(name: str, points: int, time_category: str, due_days: list[str] = _WEEKDAYS) -> dict:
"""One built-in template chore; all built-ins share the same fixed defaults."""
return {
"name": name,
"points": points,
"time_category": time_category,
"schedule_mode": "specific_days",
"due_days": list(due_days),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
}
BUILT_IN_TEMPLATES: list[dict] = [
{
"id": "morning_routine",
@@ -42,50 +58,10 @@ BUILT_IN_TEMPLATES: list[dict] = [
"icon": "mdi:weather-sunny",
"builtin": True,
"chores": [
{
"name": "Make bed",
"points": 2,
"time_category": "morning",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Brush teeth",
"points": 1,
"time_category": "morning",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Get dressed",
"points": 1,
"time_category": "morning",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Pack school bag",
"points": 2,
"time_category": "morning",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
_chore("Make bed", 2, "morning"),
_chore("Brush teeth", 1, "morning"),
_chore("Get dressed", 1, "morning"),
_chore("Pack school bag", 2, "morning"),
],
},
{
@@ -94,50 +70,10 @@ BUILT_IN_TEMPLATES: list[dict] = [
"icon": "mdi:weather-night",
"builtin": True,
"chores": [
{
"name": "Brush teeth",
"points": 1,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Put on pyjamas",
"points": 1,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Tidy room",
"points": 2,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Set out clothes for tomorrow",
"points": 1,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
_chore("Brush teeth", 1, "evening"),
_chore("Put on pyjamas", 1, "evening"),
_chore("Tidy room", 2, "evening"),
_chore("Set out clothes for tomorrow", 1, "evening"),
],
},
{
@@ -146,50 +82,10 @@ BUILT_IN_TEMPLATES: list[dict] = [
"icon": "mdi:silverware-fork-knife",
"builtin": True,
"chores": [
{
"name": "Set table",
"points": 2,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Clear plates",
"points": 2,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Load dishwasher",
"points": 3,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Wipe counters",
"points": 2,
"time_category": "evening",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
_chore("Set table", 2, "evening"),
_chore("Clear plates", 2, "evening"),
_chore("Load dishwasher", 3, "evening"),
_chore("Wipe counters", 2, "evening"),
],
},
{
@@ -198,50 +94,10 @@ BUILT_IN_TEMPLATES: list[dict] = [
"icon": "mdi:broom",
"builtin": True,
"chores": [
{
"name": "Tidy bedroom",
"points": 3,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKENDS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Hoover",
"points": 4,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKENDS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Help with laundry",
"points": 3,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKENDS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Take bins out",
"points": 2,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKENDS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
_chore("Tidy bedroom", 3, "anytime", _WEEKENDS),
_chore("Hoover", 4, "anytime", _WEEKENDS),
_chore("Help with laundry", 3, "anytime", _WEEKENDS),
_chore("Take bins out", 2, "anytime", _WEEKENDS),
],
},
{
@@ -250,50 +106,10 @@ BUILT_IN_TEMPLATES: list[dict] = [
"icon": "mdi:paw",
"builtin": True,
"chores": [
{
"name": "Feed pet",
"points": 2,
"time_category": "morning",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Fill water bowl",
"points": 1,
"time_category": "morning",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Walk dog",
"points": 3,
"time_category": "afternoon",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Clean litter tray",
"points": 3,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
_chore("Feed pet", 2, "morning"),
_chore("Fill water bowl", 1, "morning"),
_chore("Walk dog", 3, "afternoon"),
_chore("Clean litter tray", 3, "anytime"),
],
},
{
@@ -302,39 +118,9 @@ BUILT_IN_TEMPLATES: list[dict] = [
"icon": "mdi:book-open-variant",
"builtin": True,
"chores": [
{
"name": "Do homework",
"points": 3,
"time_category": "afternoon",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Read for 20 minutes",
"points": 2,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
{
"name": "Practice instrument",
"points": 2,
"time_category": "anytime",
"schedule_mode": "specific_days",
"due_days": list(_WEEKDAYS),
"requires_approval": False,
"assignment_mode": "everyone",
"daily_limit": 1,
"completion_sound": "coin",
},
_chore("Do homework", 3, "afternoon"),
_chore("Read for 20 minutes", 2, "anytime"),
_chore("Practice instrument", 2, "anytime"),
],
},
]