Open mkz212 opened 4 months ago
Hey @mkz212,
Will this work for you? https://github.com/uswong/homebridge-plugin-template/blob/latest/src/platform.ts
The lines I have added to remove those existing accessories not restored from cache are as follow: https://github.com/uswong/homebridge-plugin-template/commit/8358c8cb7f454a759569959782121171d3d4ade6
Hey @mkz212,
Will this work for you? https://github.com/uswong/homebridge-plugin-template/blob/latest/src/platform.ts
The lines I have added to remove those existing accessories not restored from cache are as follow: uswong@8358c8c
For me it seems to be ok, but @bwp91 should take a look, he maintain this and knows it best.
i just updated the template with some example code of doing this
Great template. But there is no function that removes existing accessories from the cache when they are no longer in the setup. Currently, there are only two options: get from cache or add new ones.