Hello, my custom integration is able to trigger an update (call to MyDataUpdateCoordinator._async_update_data) every 1 minute. I do see variations of sensor value in the history chart. However the UI (in example in the main page) doesn’t update and the value shown is always the one of the last reboot. Could you please advise?
Indeed I’m not calling that. Where should that be called? I’ll post the code as soon as I’m back to my laptop. Thanks for any help you can provide in the meantime.
I extracted relevant details of my code and simplified things a bit for you to avoid useless details. Also example is more generic and can better help other people.
Ok, so your issue is that you are not refreshing your data from the coordinator. When you set self.resources in your init, this is then static as a local variable. You will need to update self.resources from your coordinator to get the latest value on each update.
In my coordinator I do update the value of resource like this self.resources[k].set_value(v) into _fetch_data. Do I need to notify the GUI that the value has changed? If so how? Thanks.