NorthernMan54 / homebridge-tasmota

Plugin for Tasmota devices leveraging Home Assistant auto discovery
Apache License 2.0
35 stars 9 forks source link

Implemented CO2 support, tested with AZ7798 #13

Closed jeroenvermeulen closed 4 years ago

jeroenvermeulen commented 4 years ago

I have implemented support for the AZ-7798 CO2 Monitor. In the log below you can see it does not send a device_class, so I used the ic value. I don't know if this is the right solution, but it does work.

2020-09-30T19:45:09.611Z Tasmota:platform Discovered -> homeassistant/sensor/5D7CEB_AZ7798_CarbonDioxide/config Extech_CO210 AZ7798 CarbonDioxide {
  name: 'Extech_CO210 AZ7798 CarbonDioxide',
  stat_t: 'tele/extech_co210/SENSOR',
  avty_t: 'tele/extech_co210/LWT',
  pl_avail: 'Online',
  pl_not_avail: 'Offline',
  uniq_id: '5D7CEB_AZ7798_CarbonDioxide',
  dev: { ids: [ '5D7CEB' ] },
  unit_of_meas: 'ppm',
  ic: 'mdi:molecule-co2',
  frc_upd: true,
  val_tpl: "{{value_json['AZ7798']['CarbonDioxide']}}",
  tasmotaType: 'sensor'
}
NorthernMan54 commented 4 years ago

@jeroenvermeulen Tks very much for this pull request, looks really good.

If the pattern of using the 'ic' field makes more sense as more device's / sensors are added I may change my underlying logic