So, I just bought myself an SPS30 particle sensor, wired it to an 8266, gave it a minimal configuration (largely a copy and paste from the ESPHome web page) and ta-da! Sensor data.
Then I added the line
idle_interval: 5min
again, right from the web page and got an error.
[idle_interval] is an invalid option for [sensor.sps30]. Did you mean [update_interval], [auto_cleaning_interval]?
Hmm, OK, comment that out, let’s add some buttons. Added the autoclean button (from the web page)
button:
- platform: template
name: "SPS30 fan clean"
on_press:
then:
- sps30.start_fan_autoclean: my_sps30
and all was happy. Added the manual start and stop buttons
button:
- platform: template
name: "SPS30 fan clean"
on_press:
then:
- sps30.start_fan_autoclean: my_sps30
- platform: template
name: "SPS30 start measuring"
on_press:
then:
- sps30.start_measurement: my_sps30
- platform: template
name: "SPS30 stop measuring"
on_press:
then:
- sps30.stop_measurement: my_sps30
and another error.
button.template: [source <unicode string>:44]
platform: template
name: SPS30 start measuring
on_press:
then:
-
Unable to find action with the name 'sps30.start_measurement'.
sps30.start_measurement: my_sps30
button.template: [source <unicode string>:49]
platform: template
name: SPS30 stop measuring
on_press:
then:
-
Unable to find action with the name 'sps30.stop_measurement'.
sps30.stop_measurement: my_sps30
Am I doing something wrong? Or is the web page incorrect? Or is there some other ESPHome config I need to do that I’m unaware of?