ESPHome support for PA-210WYS CH4 Gas Leak alarm

Hello! I own two Gas Leak Detectors probably identical to what Blackadder presents as PA-210WYS (Natural Gas (CH4) Alarm Gas Sensor (PA-210WYS) Configuration for Tasmota). I got both working with Tasmota with the instructions presented by Blackadder (one small tweak to the rules - one datapoint was of different type apparently). I tried to move over to Esphome as most of my devices are Esphome based and I find it easier to understand and it seems to allow more options. Unfortunately, Tuya MCU does not seem to work for me. The logs do not show anything about datapoints. I was successful in adding the mute function as a switch by specifying DP16 and that is it. No luck with LEL value which us supposed to be reported on DP2 or the alarm on DP1. Any help would be appreciated. Thank you in advance!

Hi and welcome. Post your yaml as someone may spot something in there. Don’t forget to read about the posting rules - specifically rule 11 which refers to using preformatted text tags for your yaml.

I made a working YAML code.

esphome:

  name: garage-gas-leak-detector

  friendly_name: Garage Gas Leak Detector

esp8266:

  board: esp01_1m

# Enable logging

logger:

  baud_rate: 0

uart:

  id: uart_1

  tx_pin: TX

  rx_pin: RX

  baud_rate: 9600

tuya:

# Enable Home Assistant API

api:

  encryption:

    key: "xxxxx"

ota:

  password: "xxxxxx"

wifi:

  ssid: xxxxxxx

  password: xxxxxx

  manual_ip:

   static_ip: 192.168.1.xxx

   gateway: 192.168.1.xxx

   subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "Garage-Gas-Leak-Detector"

    password: "xxxxxxxx"

captive_portal:

   

switch:

  - platform: tuya

    id: mute

    switch_datapoint: 16

    name: "Mute"

    icon: mdi:volume-mute

sensor:

  - platform: tuya

    id: lel_value

    name: "LEL value"

    icon: mdi:molecule

    unit_of_measurement: "%"

    device_class: "gas"

    sensor_datapoint: 2

binary_sensor:

  - platform: tuya

    id: gas_alarm

    name: "Gas leak alarm"

    device_class: safety

    sensor_datapoint: 1

    filters:

      - invert

I have tested it on my PA-210WYS based on the TWYE3S board. It works well. As expected. Unfortunately, I have another similar device - esthetically the same, but it is based on the WB3S. I have replaced this module with the ESP-12S and flashed Tasmota on it. The device works well (at least for the functions I need) with Tasmota but I am still not able to use Esphome on it. the logs show an inability to initiate. After a closer examination I realized that one pin was broken on the ESP-12S. I replaced it with a TYWE3L from a broken smart bulb. The transplant was successful and the gas detector works well with the above code.

Hello all. I have this device running through SmartLife (Tuya) to my HA via the Tuya Integration. This works in the sense that I can see it and run automations off triggered events. However this is through the Tuya integration which I’m trying to slowly get off this dependency.

Am I understanding this correctly that I could flash this device and have it controlled natively through ESPHome? Looking at the yaml above, it doesn’t seem to do anything more than what I’m getting through Tuya except of course solve my Tuya dependency. I found my device has been triggering false positives lately where I have to mute it through SmartLife. I’m hoping for more control to the gas sensor such as raising the detection threshold.

Admittedly this ESPHome also a route I have not gone down short of installing the Add-On and flashing an ESPPresense sensor once only to abandon the entire ESPHome platform after finding myself able to flash my beacons via the native web flash.