Closed jimtng closed 1 month ago
it will involve manually adding an instance_double as a listener to the provider, and then setting an expectation on that listener that it gets the proper notification
I couldn't seem to get to org.openhab.core.io.rest.sitemap.SitemapSubscriptionService
in the spec, even after adding org.openhab.core.io.rest.sitemap
to ALLOWED_BUNDLES` in karaf.rb. I haven't dug deep enough to figure out why. So I'm creating an impl of the interface instead.
I've just noticed another issue. When I updated the sitemap by reloading the script, it doesn't send an update notification it seems.
I've just noticed another issue. When I updated the sitemap by reloading the script, it doesn't send an update notification it seems.
This is now fixed and explained in the comments.
See: https://github.com/openhab/openhab-core/blob/8d54ccefef1ec06b16542bf28af5452742cfaba7/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/SitemapSubscriptionService.java#L340
Without this fix, you'd have to refresh the ui (e.g. BasicUI) to "see" the change in the given example below. With the fix, BasicUI will automatically refresh.
Steps: