Recommended way to define scan intervals for sensors?

Being new to HA (docker latest-v8) I wonder about the concept in HA to define appropriate scan intervals for different sensor types and number of sensors connected to a sensor netowrk. Example: Having a 1-wire sensor network with abount 50+ sensors it takes some time to poll all sensors. I am using owserver as service provided as docker container and use the HA 1-Wire Integration. From known smarthome systems like FHEM or iobroker I know that polling update rate or scan intervals can be specified e.g. by entity.

Having spent considerable amount of time searching for a solution in HA I have not found a solution yet.
onewire-update-interval-caching topic 343711
onewire-add-scan-interval-option topic 311586
post look open state and the suggested solutions found here

are not clear to me.

Having a controlled and suitable sensor update rate in alignment with the physics (temp changes depend on media) it is also beneficial to reduce data to be stored. For keeping important historical data I am using an influxdb2.x and do not want this to be polluted with redundant data.

Could someone pls. recommend best way and hands-on example to define scan/polling interval of 300 seconds for my 1-wire sensors.

Thanx in advance for your help.

P.S. had to stripe links because new users can only post 2 links in a post.

Disable polling on the integration in the UI. Then use homeassistant.update_entity at whatever frequency you want via an automation.

- alias: 300 Second Polling
  trigger:
  - platform: time_pattern
    minutes: "/5"
  action:
  - service: homeassistant.update_entity
    target:
      entity_id: ... insert entity id here ...

Thanx @petro. I have found the switch to diable polling for the entity.

  1. Is adding this code in configarion.yaml correct? - any specific position?
- alias: 300 Second Polling
  trigger:
  - platform: time_pattern
    minutes: "/5"
  action:
  - service: homeassistant.update_entity
    target:
      entity_id: sensor.28_a76e77911801_temperatur
      entity_id: sensor.28_a76e77911802_temperatur
      entity_id: sensor.28_a76e77911803_temperatur

two more questions:
2. could the template of the 1-wire entitiy be extended to add the value of the alias directly in the GUI?
3. is there a way to make the alias editable through GUI ?

I have no idea what you’re asking here. Can you elaborate?

where do I need to add the suggested code ? and is the example above having multiple entities correct?

it’s an automation. Yes, that works for multiple entities.

Though the entities should be a list:

  action:
  - service: homeassistant.update_entity
    target:
      entity_id: 
        - sensor.28_a76e77911801_temperatur
        - sensor.28_a76e77911802_temperatur
        - sensor.28_a76e77911803_temperatur
1 Like

yep, wasn’t paying attention

1 Like

thanx. it is getting much clearer now …

Step1 disable the 30s HA automatic scan update interval for 1-Wire.

Step 2 setup automation in GUI - here example with 2 min update


The example shows only one entity but there could be added more; nice approach.

There is also possibility to modify in automations.yaml. manually as I have the sensor ID lists already.