Disable/enable the polling of a sensor device?

Hello.
Is there any option/service to dinamically disable the polling of a sensor device (generic for all devices?)

Thats my problem:
I am uning a raspberrypi3 for HA and kodi (among others), and I have a button on remote to switch between sound to HDMI (TV) and to bluetooth speakers (a2dp) depending on the position from where I see the TV. This functionality works really fine. My problem appeared when I configured a xiaomi flower care device, that works with BTLE (Low Energy), because every time that HA poll the xiaomi flora, I experience problems in BT A2DP audio flow. It is known that actual RPI3 bluetooth chip has interferences when switch between BT and BTLE mode.
Due that HA known when IĀ“m playing on kodi, I would like to make a rule that disable polling of miflora plant when Im seen on kodi, and enable again when I stop playing.

I can achieve this with commandline bluetoothctl and ā€œblockā€ miflora BT device, but I think that could be more elegant from HA.

I have seen that a service for ā€œenable/disable pollingā€ of a sensor device could be great in other future interference scenarios (i.e speedtest + kodi online streaming)

Thanks in advance.

1 Like

Did you manage to resolve turning on / off polling of a sensor?

I have a REST sensor that I only want to activate while an automation is running, I tried putting the sensor into an automation as a trigger, but HASS didnā€™t like that.

I dont figure how to enable/disable polling of a deviceā€¦ I suppose this has to be implemented by developers. Maybe someone can read this post.

I have to make a expect script blocking and unblocking miflora BT address with bluetoothctl (from homeassistant user) but completely external to Home Assistant. Obbiously, with this, HA is trying to polling to Bluetootth, but no action is executed at interface level, so I dont have bluetooth interferences.

Maybe you could find some external option to ā€œblockā€ REST sensor like me.

Sorry.