Skip to content

feat: prune leftover PlantRun device-registry shells - #99

Merged
NicoM701 merged 1 commit into
codex/plant-run-redesignfrom
codex/orphan-device-shells
Aug 30, 2026
Merged

NicoM701 merged 1 commit into
codex/plant-run-redesignfrom
codex/orphan-device-shells

Conversation

@NicoM701

Copy link
Copy Markdown
Owner

Summary

  • Home Assistant currently refuses to delete leftover PlantRun devices (Config entry does not support device removal) because the integration never implemented async_remove_config_entry_device.
  • PlantRun now allows removing a device only when none of its plantrun identifiers match a live storage.runs id, and it prunes those shells on setup/reload via the device registry API.
  • Live run devices stay. Hidden v2 legacy-bucket ids are not treated as live. Devices from other domains on the same config entry are left alone.

Test plan

  • python -m unittest discover -s tests -p 'test_*.py' (154 tests)
  • After merge/install: reload PlantRun on the live instance and confirm Amnesia / Purple Cookie Kush shells disappear
  • Confirm Diesel Auto RQS and Tangerine Dream Auto Zamnesia devices remain
  • Confirm HA can delete an orphan shell without unloading the config entry

Remaining risk

Reload on the live 0.8.1 install is the actual cleanup. Unit tests cover the registry contract with fakes, not a running Home Assistant.

Home Assistant refused to delete empty leftover run devices because PlantRun never implemented device removal. Allow registry delete for identifiers that are not in current storage.runs, and drop those shells on setup or reload.

Co-authored-by: Cursor <cursoragent@cursor.com>
@NicoM701
NicoM701 marked this pull request as ready for review August 30, 2026 21:15
@NicoM701
NicoM701 merged commit d59dde1 into codex/plant-run-redesign Aug 30, 2026
3 checks passed
@NicoM701
NicoM701 deleted the codex/orphan-device-shells branch August 30, 2026 21:19
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