I too am looking for the same thing. I have a REST sensor which reads the state of the TV (current program, power state, etc), and I’d like to update it once I use scripts within Home Assistant to change the channel or turn it off/on. Currently it polls the state every 5 minutes.
I was hunting on how to do the same, and found a solution amongst a bunch of other threads here. So, for the future user who’s also looking for the same, here’s how you do it:
Use the homeassistant.update_entity service, with the name of the restful sensor, which will refresh it ahead of the regular polling period.