问题
I have a question regarding report state and live updating in the app.
When I report a state from my server I expect to see changes in my thermostat without going to the main screen of the app and back into the thermostat. Now I have read many similar questions about this and I understand the app doesn't support updating the UI in real time with report state.
I also followed the codelabs tutorial on implementing a smart home action (https://codelabs.developers.google.com/codelabs/smarthome-washer/#0). With this implementation the UI updates as soon as report state is called, which is what I would expect.
Essentialy what I have done is just modify the codelabs example to work with express, and changed the washer to a thermostat. Also the report state returns status code 200.
So how come the UI is updated when using the demo implementation from codelabs, but not when I use my implementation? The code from codelabs runs on firebase while mine runs on an express instance on my laptop, maybe that's the problem?
来源:https://stackoverflow.com/questions/61141669/google-smart-home-report-state-real-time-ui-update