mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 00:10:22 +00:00
[mhz19] Use register_apply_action for the four mhz19 actions (#19631)
This commit is contained in:
@@ -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,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
|
||||
Reference in New Issue
Block a user