Dynamic update interval for SDS011 particulate sensor

Hi !
To extend the life time of a SDS011 sensor I’ve set the update_interval to 5min.

The use case is a “smoke detector” so if the sensor detects rising particle values I want to switch to continuous mode for quick verification before triggering the alert.

Is there a way to do this ?

Thanks for any hints,
Michael

According tot the documentation, the update interval is not templatable, so there is no way to make it dynamically.

If you need smoke detection (as in fire prevention) I would strongly suggest you buy a certified one that you can link to HA. Do not rely solely on HA to warn you. Just to name one silly example, if your HA overheats and catches fire, you won’t get a warning and you will die along with it.

ok - thanks for the feedback

The use case is an outdoor BBQ and smoker detection :wink:
Of course I’ve installed certified smoke detectors in the house …

I can rest easy then :smile:

1 Like

i’m trying to do something similar. i want to update the sds sensor less frequently if im away from home and more if the particles are high. i have managed to do this in node-red to write a every single time a new configuration but im now on esp home and it seems not possible. There must by a way right?

I do it this way…

script:
  - id: interval
    mode: restart
    then:
      - component.update: bme280_sensor
      - delay: !lambda "return id(update_interval).state * 1000;"
      - script.execute: interval

sensor:
  - platform: homeassistant
    id: update_interval
    entity_id: input_number.bme280_update_interval
    on_value:
      then:
        - script.execute: interval

  - platform: bme280
    id: bme280_sensor
    address: 0x76
    update_interval: never
    temperature:
      name: $device_name Temperature
      id: temperature
      icon: mdi:temperature-fahrenheit
      accuracy_decimals: 1
    humidity:
      name: $device_name Humidity
      id: humidity
      icon: mdi:water-percent
      accuracy_decimals: 1
    pressure:
      name: $device_name Pressure
      id: pressure
      accuracy_decimals: 5