[mhz19] Use register_apply_action for the four mhz19 actions (#19631)

This commit is contained in:
J. Nick Koston
2026-09-25 13:07:15 -04:00
committed by GitHub
parent c561c6bbe8
commit eb85778a60
5 changed files with 29 additions and 78 deletions
@@ -0,0 +1,10 @@
button:
- platform: template
name: MH-Z19 Actions
on_press:
- mhz19.calibrate_zero: mhz19_sensor
- mhz19.abc_enable: mhz19_sensor
- mhz19.abc_disable: mhz19_sensor
- mhz19.detection_range_set:
id: mhz19_sensor
detection_range: 2000ppm
+1
View File
@@ -1,5 +1,6 @@
sensor:
- platform: mhz19
id: mhz19_sensor
co2:
name: MH-Z19 CO2 Value
temperature:
@@ -0,0 +1,8 @@
substitutions:
tx_pin: GPIO0
rx_pin: GPIO2
packages:
uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml
mhz19: !include common.yaml
actions: !include common-actions.yaml