While debugging my binding I have an issue where if I update the configuration of a thing it doesn’t always call ThingUpdated()
Sometimes i just get:
2021-02-23 12:22:10.132 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'Sonoff.things'
Other times I get the full:
2021-02-23 12:22:10.132 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'Sonoff.things'
2021-02-23 12:22:10.227 [DEBUG] [noff.internal.handler.AccountHandler] - Sonoff - Running dispose()
I’m not sure whether its a bug in the core or not or whether this is intended design.
Steps to reproduce:
1: Start fresh (clear cache etc) with value for bridge set to accessmode="local"
Binding starts and all is normal
2: Change things file to accessmode="cloud"
ThingUpdated() gets called and works
3: Change to another mode accessmode="mixed"
ThingUpdated() gets called and works
4: Change back to original value on startup accessmode="local"
ThingUpdated() doesn’t get called
It seems that The thing manager caches the original value and doesn’t call thingUpdated as its already there. Maybe this is a limitation of text files??