0.10.1 — Motion Detector II indicator light left orphaned after profile switch (#356)
No breaking config changes.
Fixed
- Stale
MotionDetectorLightentity after an installation-profile switch
(light.py,select.py, newentity.pyhelper). The Motion Detector II
[+M]/OUTDOOR indicator light is only backed by BinarySwitch/MultiLevelSwitch
services that exist in that profile; switching the device to GENERIC via the
writableselect.installation_profile(#353) madelight.pysimply stop
creating the entity on the next setup pass, leaving the old one orphaned in
the entity registry indefinitely. Two fixes: (1) new
entity.async_remove_stale_entity()actively removes the registry entry
once a MD2's light becomes unsupported/excluded/suppressed, instead of just
skipping creation; (2)InstallationProfileSelect.async_select_optionnow
triggers a config-entry reload after writing the new profile, so the
entity list updates immediately instead of only after a manual
reload/restart. The motion sensor itself is unaffected either way. - Same cleanup now also fires when a MD2 that previously had the light
entity is added to the excluded-devices option (was previously skipped
silently, same orphaning bug).