Skip to content

feat: Add area support for maintenance tasks - #117

Open
Seidlm wants to merge 1 commit into
TJPoorman:mainfrom
Seidlm:feature/area-support
Open

feat: Add area support for maintenance tasks#117
Seidlm wants to merge 1 commit into
TJPoorman:mainfrom
Seidlm:feature/area-support

Conversation

@Seidlm

@Seidlm Seidlm commented Mar 1, 2026

Copy link
Copy Markdown

Summary

Adds the ability to assign a Home Assistant Area to each maintenance task. When a task has an area assigned, the corresponding binary_sensor entity is automatically placed in that area.

Changes

Backend

  • store.py: Added area_id field to HomeMaintenanceTask, entity registry area update on add() and update_task()
  • binary_sensor.py: Sets area_id via entity registry in async_added_to_hass()
  • websocket.py: Added area_id to add_task schema and task constructor

Frontend

  • types.ts: Added area_id to Task interface
  • main.ts: Added area selector to new task form (advanced section) and edit dialog, area_id handling in add/save/edit handlers
  • Translations: Added Area/Bereich labels in en.json and de.json

How it works

  • New optional area dropdown in the task creation form (under Advanced)
  • Area can also be set/changed when editing a task
  • The area_id is persisted in storage and applied to the entity via the HA entity registry
  • Fully backward compatible - existing tasks without area continue to work as before

cfoucher added a commit to cfoucher/home_maintenance that referenced this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant