Jonathan Haas commited on
Commit ·
44db8fa
1
Parent(s): 9381cfc
Add Home Assistant control-layer operations runbook
Browse filesFiles changed (2)
84 unmodified lines85868788899084 unmodified linesSmart home safety defaults:- Sensitive domains (`lock`, `alarm_control_panel`, `cover`) require `confirm=true` when `dry_run=false`.- `HOME_PERMISSION_PROFILE=readonly` disables mutating `smart_home` actions but keeps `smart_home_state`.## Usage84 unmodified lines8586878889909184 unmodified linesSmart home safety defaults:- Sensitive domains (`lock`, `alarm_control_panel`, `cover`) require `confirm=true` when `dry_run=false`.- `HOME_PERMISSION_PROFILE=readonly` disables mutating `smart_home` actions but keeps `smart_home_state`.- Operational runbook: [`docs/operations/home-control-policy.md`](docs/operations/home-control-policy.md).## Usage
123456789101112131415161718192021222324252627282930313233343536373839404142434445# Home Control Policy Layers
This project uses multiple control layers for Home Assistant actions.
## 1) Feature Toggle- `HOME_ENABLED=true|false`- When `false`, both `smart_home` and `smart_home_state` tools are disabled.
## 2) Permission Profile- `HOME_PERMISSION_PROFILE=readonly|control`- `readonly`: denies mutating `smart_home` actions, allows `smart_home_state`.- `control`: allows both tools, subject to policy checks below.
## 3) Runtime Safety PolicyFor `smart_home` requests:- `domain`, `action`, and `entity_id` are required.- `entity_id` domain must match `domain`.- Known domain/action pairs are validated before execution.- Sensitive domains (`lock`, `alarm_control_panel`, `cover`) require: - `dry_run=false` - `confirm=true`- Idempotency short-circuits: - `turn_on` returns no-op if already on. - `turn_off` returns no-op if already off.
## 4) Transport/Service Validation- Preflight state read checks entity existence and auth before mutation.- Request outcomes are normalized into telemetry error taxonomy.
## 5) Audit and Diagnostics- All smart-home actions are audit logged.- `system_status` includes: - tool allow/deny counts - active `home_permission_profile`
## Recommended Profiles- Development: `HOME_PERMISSION_PROFILE=readonly`- Trusted local automation: `HOME_PERMISSION_PROFILE=control`
## Troubleshooting- If actions are denied unexpectedly: 1. Check `HOME_ENABLED`. 2. Check `HOME_PERMISSION_PROFILE`. 3. Ensure sensitive executes pass `confirm=true`. 4. Verify `HASS_URL` and `HASS_TOKEN` are both set.README.md+1
docs/operations/home-control-policy.mdAdded+45