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
+14 -183
View File
@@ -4,49 +4,15 @@ from typing import Final
DOMAIN: Final = "taskmate"
# Configuration keys
CONF_CHILDREN: Final = "children"
CONF_CHORES: Final = "chores"
CONF_REWARDS: Final = "rewards"
CONF_POINTS_NAME: Final = "points_name"
CONF_POINTS_ICON: Final = "points_icon"
# Child keys
CONF_CHILD_NAME: Final = "name"
CONF_CHILD_AVATAR: Final = "avatar"
CONF_CHILD_POINTS: Final = "points"
CONF_CHILD_ID: Final = "id"
CONF_CHILD_AVAILABILITY_ENTITY: Final = "availability_entity"
# Chore keys
CONF_CHORE_NAME: Final = "name"
CONF_CHORE_DESCRIPTION: Final = "description"
CONF_CHORE_POINTS: Final = "points"
CONF_CHORE_DUE_DAYS: Final = "due_days"
CONF_CHORE_ASSIGNED_TO: Final = "assigned_to"
CONF_CHORE_ID: Final = "id"
CONF_CHORE_REQUIRES_APPROVAL: Final = "requires_approval"
CONF_CLAIM_ALLOWANCE_MINUTES: Final = "claim_allowance_minutes"
DEFAULT_CLAIM_ALLOWANCE_MINUTES: Final = 0
CONF_CHORE_ASSIGNMENT_MODE: Final = "assignment_mode"
CONF_CHORE_ASSIGNMENT_ROTATION_ANCHOR: Final = "assignment_rotation_anchor"
CONF_CHORE_PUBLISH_CALENDARS: Final = "publish_calendar_entities"
CONF_CHORE_REQUIRE_AVAILABILITY: Final = "require_availability"
CONF_CHORE_MANUAL_START_CHILD: Final = "manual_start_child_id"
# Task groups
CONF_TASK_GROUPS: Final = "task_groups"
CONF_TASK_GROUP_ID: Final = "group_id"
CONF_TASK_GROUP_NAME: Final = "name"
CONF_TASK_GROUP_POLICY: Final = "policy"
CONF_TASK_GROUP_CHORE_IDS: Final = "chore_ids"
TASK_GROUP_POLICIES: Final = ["sticky", "spread"]
DEFAULT_TASK_GROUP_POLICY: Final = "sticky"
# Calendar projection: how many days ahead each chore's assignment is pushed
# into the configured HA calendars. 14 days balances planning visibility with
# calendar noise; raise via the Settings flow for longer planning horizons.
CONF_CALENDAR_PROJECTION_DAYS: Final = "calendar_projection_days"
DEFAULT_CALENDAR_PROJECTION_DAYS: Final = 14
MIN_CALENDAR_PROJECTION_DAYS: Final = 1
MAX_CALENDAR_PROJECTION_DAYS: Final = 90
@@ -59,56 +25,28 @@ MAX_CALENDAR_PROJECTION_DAYS: Final = 90
# "first_come" = competitive: shown to the whole pool at once; first child to complete it wins and it
# hides for everyone else (shared quota of 1). A parent rejection reopens it for the pool.
ASSIGNMENT_MODES: Final = ["everyone", "alternating", "random", "balanced", "first_come", "unassigned"]
DEFAULT_ASSIGNMENT_MODE: Final = "everyone"
# Reward keys
CONF_REWARD_NAME: Final = "name"
CONF_REWARD_DESCRIPTION: Final = "description"
CONF_REWARD_COST: Final = "cost"
CONF_REWARD_ICON: Final = "icon"
CONF_REWARD_ID: Final = "id"
CONF_REWARD_QUANTITY: Final = "quantity"
CONF_REWARD_EXPIRES_AT: Final = "expires_at"
# Default values
DEFAULT_POINTS_NAME: Final = "Stars"
DEFAULT_POINTS_ICON: Final = "mdi:star"
# Days of week
DAYS_OF_WEEK: Final = [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
]
# Recurrence options for chores (Mode B)
RECURRENCE_OPTIONS: Final = [
"every_2_days",
"weekly",
"every_2_weeks",
"monthly",
"every_3_months",
"every_6_months",
]
RECURRENCE_LABELS: Final = {
"every_2_days": "Every 2 days",
"weekly": "Weekly",
"every_2_weeks": "Every 2 weeks",
"monthly": "Monthly",
"every_3_months": "Every 3 months",
"every_6_months": "Every 6 months",
}
# Schedule modes
SCHEDULE_MODES: Final = ["specific_days", "recurring", "one_shot"]
# First occurrence modes
FIRST_OCCURRENCE_MODES: Final = ["available_immediately", "wait_for_first_occurrence"]
# Nominal length of each Mode-B recurrence period, in days. Used for report
# expectations and recurrence math (not for the shorter availability window
# in coord_chores.is_chore_available_for_child, which is deliberately capped).
RECURRENCE_PERIOD_DAYS: Final = {
"every_2_days": 2,
"weekly": 7,
"every_2_weeks": 14,
"monthly": 30,
"every_3_months": 91,
"every_6_months": 182,
}
# Badge tiers, lowest to highest.
BADGE_TIERS: Final = ["bronze", "silver", "gold", "platinum"]
# Time categories for chores
TIME_CATEGORIES: Final = [
@@ -140,101 +78,6 @@ DEFAULT_TIME_PERIODS: Final = [
MAX_TIME_PERIODS: Final = 24
# Avatar options
AVATAR_OPTIONS: Final = [
# Basic faces
"mdi:account-circle",
"mdi:face-man",
"mdi:face-woman",
"mdi:face-man-outline",
"mdi:face-woman-outline",
# Fun character avatars
"mdi:robot-happy",
"mdi:robot-excited",
"mdi:alien",
"mdi:ninja",
"mdi:pirate",
# Animals kids love
"mdi:cat",
"mdi:dog",
"mdi:unicorn",
"mdi:dragon",
"mdi:owl",
"mdi:penguin",
"mdi:panda",
"mdi:rabbit",
"mdi:koala",
"mdi:fox",
"mdi:dolphin",
"mdi:jellyfish",
"mdi:octopus",
"mdi:butterfly",
# Splatoon Inkling-inspired (colorful, action-themed)
"mdi:palette",
"mdi:spray",
"mdi:water-outline",
"mdi:shimmer",
"mdi:flare",
"mdi:star-face",
"mdi:emoticon-cool",
"mdi:emoticon-excited",
"mdi:emoticon-kiss",
"mdi:emoticon-wink",
"mdi:emoticon-happy",
"mdi:emoticon-poop",
"mdi:face-woman-shimmer",
"mdi:face-man-shimmer",
"mdi:account-star",
"mdi:account-heart",
# Gaming and action themed
"mdi:gamepad-variant",
"mdi:controller",
"mdi:trophy",
"mdi:crown",
"mdi:lightning-bolt",
"mdi:fire",
"mdi:rocket",
"mdi:sword",
"mdi:shield",
# Space and fantasy
"mdi:alien-outline",
"mdi:ufo",
"mdi:space-invaders",
"mdi:ghost",
"mdi:skull-crossbones",
"mdi:wizard-hat",
"mdi:magic-staff",
# Nature and colorful
"mdi:flower-tulip",
"mdi:flower-poppy",
"mdi:clover",
"mdi:mushroom",
"mdi:star-shooting",
"mdi:star-four-points",
"mdi:heart",
"mdi:heart-multiple",
"mdi:diamond-stone",
"mdi:puzzle-heart",
]
# Reward icon options
REWARD_ICON_OPTIONS: Final = [
"mdi:gift",
"mdi:ice-cream",
"mdi:pizza",
"mdi:movie",
"mdi:gamepad-variant",
"mdi:tablet",
"mdi:television",
"mdi:bike",
"mdi:currency-usd",
"mdi:shopping",
"mdi:party-popper",
"mdi:swim",
"mdi:sleep",
"mdi:candy",
]
# Platforms
PLATFORMS: Final = ["sensor", "button", "binary_sensor"]
@@ -331,12 +174,6 @@ ATTR_BADGE_NOTIFY_ON_EARN: Final = "notify_on_earn"
ATTR_BADGE_ENABLED: Final = "enabled"
ATTR_AWARDED_BADGE_ID: Final = "awarded_badge_id"
# States
STATE_PENDING: Final = "pending"
STATE_AWAITING_APPROVAL: Final = "awaiting_approval"
STATE_COMPLETED: Final = "completed"
STATE_CLAIMED: Final = "claimed"
# Completion sound options
# Most sounds are synthesized via Web Audio API
# Fart sounds are CC0 audio files from BigSoundBank.com and GfxSounds.com
@@ -361,12 +198,6 @@ COMPLETION_SOUND_OPTIONS: Final = [
"fart_random", # Random fart - picks a random fart sound each time!
]
# Default completion sound
DEFAULT_COMPLETION_SOUND: Final = "coin"
# Chore keys (sound-related)
CONF_CHORE_COMPLETION_SOUND: Final = "completion_sound"
# --- Chore difficulty tiers ---
# Each chore carries a difficulty tier; the points it awards are the base
# points multiplied by the tier's multiplier. "medium" is the neutral baseline