eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 787 forks source link

Keep persisted disabled status when thing is removed #6870

Closed FStolte closed 5 years ago

FStolte commented 5 years ago

The disabled status was not persisted after a restart since it was removed on shutdown during the thing removal. Now it will be persisted, but the disabled status of permanently deleted disabled things will remain as orphan entry in the database.

Fixes #6840

Signed-off-by: Florian Stolte fstolte@itemis.de

kaikreuzer commented 5 years ago

Thanks, I have ported this PR also to https://github.com/openhab/openhab-core/pull/493.

Note that I think that the fix is not ideal as it prevents any cleanup - but as long as there is no proper startup/shutdown management, there's probably no better way to deal with it.