weaja_s9_gasalarm.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Gas alarm
  2. # products:
  3. # - id: UNKNOWN
  4. # manufacturer: Weaja
  5. # model: WJ-TUYA-S9
  6. entities:
  7. - entity: binary_sensor
  8. class: gas
  9. dps:
  10. - id: 2
  11. type: string
  12. name: sensor
  13. mapping:
  14. - dps_val: alarm
  15. value: true
  16. - value: false
  17. - entity: number
  18. name: Alarm time
  19. category: config
  20. class: duration
  21. dps:
  22. - id: 3
  23. type: integer
  24. optional: true
  25. name: value
  26. unit: min
  27. range:
  28. min: 0
  29. max: 60
  30. mapping:
  31. - dps_val: null
  32. value: 0
  33. hidden: true
  34. # dp 12 is labelled as switch_alarm, but does not appear to work, so
  35. # possibly just an indicator of some sort. Left as an attribute until
  36. # it can be figured out.
  37. - id: 12
  38. type: boolean
  39. name: switch
  40. - entity: sensor
  41. name: Gas
  42. icon: "mdi:fire"
  43. dps:
  44. - id: 5
  45. type: integer
  46. name: sensor
  47. unit: "% LEL"
  48. class: measurement
  49. mapping:
  50. - scale: 10
  51. - entity: binary_sensor
  52. name: Carbon monoxide
  53. class: gas
  54. dps:
  55. - id: 6
  56. type: string
  57. name: sensor
  58. mapping:
  59. - dps_val: alarm
  60. value: true
  61. - value: false
  62. - entity: button
  63. name: Mute
  64. category: config
  65. dps:
  66. - id: 14
  67. type: boolean
  68. name: button
  69. optional: true
  70. - entity: sensor
  71. class: carbon_monoxide
  72. category: diagnostic
  73. dps:
  74. - id: 20
  75. type: integer
  76. name: sensor
  77. unit: ppm
  78. class: measurement