Trying to change device polling interval.
There is an official instruction how to do this: disable default polling for device and trigger homeassistant.update_entity with custom automation.
Sounds simple. But:
I can disable/enable default polling only on device level, not for a single entity.
I can call homeassistant.update_entity service for individual entities only, not for a whole device.
The device I work with contains 33 entities. So, the only correct way to change polling frequency is to list all 33 entities in my automation. Doesn’t look to be good.
It’s just how things work under the hood. If you have an endpoint that provides 47 pieces of data, do you want to do 47 requests for singular data or 1 request for 47 data?
HA will perform 1 request to update the entity but all other data that comes through the request also updates its associated entity.
It’s built like this to reduce api calls so that users don’t go over usage limits, or things like usage limits.
Did I understand correctly: This behavior is integration dependent. When update_entity service is called for an entity, HA calls it for a single entity. Integration that provided the entity usually updates all its entities when any update is called (just because usually it is the most simple and effective way). But that is not guaranteed: another integration can update only half of entities or a single one in the same case.
?