What problem does it solve? Home Assistant configuration in this homelab lives entirely in an Ansible role under ansible/roles/k8s/home-assistant/, and UI edits are overwritten on deploy. This Skill guides you through making correct, idempotent changes to automations, scenes, scripts, and template sensors the repo's way, avoiding the common traps of inline Jinja, missing ConfigMap wiring, and stale state models. ## Core Features & Use Cases - File routing: Maps each change type (automation, scene, script, template sensor, helper, threshold) to the exact file under the role, including defaults/main.yml registration for new files. - Tested Jinja macros: Enforces putting tunable math (fan curves, lux gates, wake ramps) in custom_templates/*.jinja macros with pytest coverage instead of inline YAML formulas. - ConfigMap and state-model wiring: Ensures new files get lookup('file') lines in configmap.yaml.j2 and regenerates state/derived_state.yml when entity writers change. - Use Case: You want to add a new fan-speed automation with a temperature curve. The Skill directs you to create files/automations/fan-and-air.yaml entries, extend the tested macro in custom_templates/fan.jinja, register the file, validate, deploy via ha-deploy, and confirm the entity loaded. ## Quick Start Ask the assistant to add a new Home Assistant automation that dims the bedroom lights at sunset using this repo's conventions.