Guest User

Untitled

a guest
Aug 23rd, 2024
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
  2. const tz = require('zigbee-herdsman-converters/converters/toZigbee');
  3. const exposes = require('zigbee-herdsman-converters/lib/exposes');
  4. const tuya = require('zigbee-herdsman-converters/lib/tuya');
  5. const e = exposes.presets;
  6. const ea = exposes.access;
  7.  
  8. const definition = {
  9. fingerprint: [
  10. {
  11. modelID: 'TS0207',
  12. manufacturerName: '_TZ3210_tgvtvdoc',
  13. },
  14. ],
  15. model: 'TS0207_rain_sensor',
  16. vendor: 'Tuya',
  17. description: 'Solar Rain Sensor RB-SRAIN01',
  18. fromZigbee: [tuya.fz.datapoints, fz.battery, fz.ias_water_leak_alarm_1],
  19. toZigbee: [],
  20. exposes: [
  21. e.water_leak('raining').withDescription('Droplet Detection (Raining)'),
  22. e.numeric('illuminance', ea.STATE).withUnit('mV').withDescription('Illuminance level'),
  23. e.numeric('illuminance_average_20min', ea.STATE).withUnit('mV').withDescription('Illuminance average for the last 20 minutes'),
  24. e.numeric('illuminance_maximum_today', ea.STATE).withUnit('mV').withDescription('Illuminance maximum for the last 24 hours'),
  25. e.binary('cleaning_reminder', ea.STATE, 'ON', 'OFF').withDescription('Cleaning reminder'),
  26. e.numeric('rain_intensity', ea.STATE).withUnit('mV').withDescription('Rainfall intensity'),
  27. e.numeric('battery', ea.STATE).withUnit('%').withDescription('Battery level'),
  28. e.battery_low(), e.battery(),
  29. ],
  30. meta: {
  31. tuyaDatapoints: [
  32. [101, 'illuminance', tuya.valueConverter.raw],
  33. [102, 'illuminance_average_20min', tuya.valueConverter.raw],
  34. [103, 'illuminance_maximum_today', tuya.valueConverter.raw],
  35. [104, 'cleaning_reminder', tuya.valueConverter.trueFalse],
  36. [105, 'rain_intensity', tuya.valueConverter.raw],
  37. ],
  38. },
  39. extend: [],
  40. };
  41.  
  42. module.exports = definition;
Advertisement
Add Comment
Please, Sign In to add comment