Adjust device scan interval within script

I recently bought a tplink hs110 to monitor power usage on my TV. The thought was that I could use this as a sensor to check if the TV is on or not. It works great for this purpose, but my actual intended use was to check in a script upon firing an IR command whether the TV actually turned on or off (you see, my TV responds imperfectly to IR commands, sometimes it doesn’t see the command or, if i repeat, it sees both and shuts off then immediately comes back on). If the TV responded wrong, the script would resend the IR signal to ensure the intended result.

The problem is the polling interval. The state of the switch isn’t updated quickly enough by HA to react appropriately within the script (it would be weird to turn the TV off, have it fail, then turn the TV off 10 seconds later). It seems that I should have consulted the Home Assistant documentation (rather than Amazon reviews) when selecting my switch. Perhaps it would have been more appropriate to select a local push switch instead of local polling switch (though I don’t know how push applies to the energy monitoring aspect)

Anyway, the TV Switch doesn’t need constant short interval polling (needlessly sending data over wifi). It only needs to tighten the scan interval during script operation, then set it back to a longer interval for normal operation.

Is there a way to dynamically change a device’s scan interval within a script? Tighten it up to maybe 100ms while the script needs it, then set it back when the script is done?

If not, do you think I could rely on a local push switch with energy monitoring to update HA with a value change more quickly?

Alternatively, maybe instead of changing the scan interval, maybe there’s a way to force a device poll?

I found a command line utility to query the hs110, but I don’t see a way to return an attribute value from a shell command except by command line sensor, and then I’m back to the scan_interval issue again.

Did you ever find a way to set the scan_interval dynamically?