smartplugv2_energyv2.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. name: Energy monitoring smartplug
  2. products:
  3. - id: jdj6ccklup7btq3a
  4. name: Tongou TO-Q-SY1-JWT
  5. - id: w906qkrrhd3otiwd
  6. name: Moes ME322
  7. primary_entity:
  8. entity: switch
  9. class: outlet
  10. dps:
  11. - id: 1
  12. type: boolean
  13. name: switch
  14. - id: 21
  15. type: integer
  16. name: test_bit
  17. optional: true
  18. - id: 26
  19. type: bitfield
  20. name: fault_code
  21. - id: 42
  22. type: string
  23. name: cycle_timer
  24. optional: true
  25. - id: 43
  26. type: string
  27. name: random_timer
  28. optional: true
  29. - id: 44
  30. type: string
  31. name: inching
  32. optional: true
  33. secondary_entities:
  34. - entity: number
  35. category: config
  36. translation_key: timer
  37. dps:
  38. - id: 9
  39. type: integer
  40. name: value
  41. unit: min
  42. range:
  43. min: 0
  44. max: 86400
  45. mapping:
  46. - scale: 60
  47. step: 60
  48. - entity: sensor
  49. category: diagnostic
  50. name: Energy
  51. dps:
  52. - id: 17
  53. name: sensor
  54. type: integer
  55. optional: true
  56. unit: Wh
  57. - id: 25
  58. type: integer
  59. name: calibration
  60. optional: true
  61. - entity: sensor
  62. category: diagnostic
  63. class: current
  64. dps:
  65. - id: 18
  66. name: sensor
  67. type: integer
  68. class: measurement
  69. force: true
  70. unit: mA
  71. - id: 23
  72. type: integer
  73. name: calibration
  74. optional: true
  75. - entity: sensor
  76. category: diagnostic
  77. class: power
  78. dps:
  79. - id: 19
  80. name: sensor
  81. type: integer
  82. class: measurement
  83. force: true
  84. unit: W
  85. mapping:
  86. - scale: 10
  87. - id: 24
  88. type: integer
  89. name: calibration
  90. optional: true
  91. - entity: sensor
  92. category: diagnostic
  93. class: voltage
  94. dps:
  95. - id: 20
  96. name: sensor
  97. type: integer
  98. class: measurement
  99. force: true
  100. unit: V
  101. mapping:
  102. - scale: 10
  103. - id: 22
  104. type: integer
  105. name: calibration
  106. optional: true
  107. - entity: binary_sensor
  108. class: problem
  109. category: diagnostic
  110. dps:
  111. - id: 26
  112. type: bitfield
  113. name: sensor
  114. mapping:
  115. - dps_val: 0
  116. value: false
  117. - value: true
  118. - entity: select
  119. category: config
  120. name: Initial state
  121. icon: "mdi:toggle-switch"
  122. dps:
  123. - id: 38
  124. type: string
  125. name: option
  126. mapping:
  127. - dps_val: "on"
  128. value: "On"
  129. - dps_val: "off"
  130. value: "Off"
  131. - dps_val: memory
  132. value: "Last State"
  133. - entity: switch
  134. name: Overcharge protection
  135. category: config
  136. dps:
  137. - id: 39
  138. type: boolean
  139. name: switch
  140. optional: true
  141. - entity: lock
  142. translation_key: child_lock
  143. category: config
  144. dps:
  145. - id: 41
  146. type: boolean
  147. name: lock
  148. - entity: select
  149. name: Light mode
  150. icon: "mdi:television-ambient-light"
  151. category: config
  152. dps:
  153. - id: 40
  154. type: string
  155. name: option
  156. optional: true
  157. mapping:
  158. - dps_val: relay
  159. value: State
  160. - dps_val: pos
  161. value: Position
  162. - dps_val: "on"
  163. value: "On"
  164. - entity: binary_sensor
  165. name: Online
  166. class: connectivity
  167. category: diagnostic
  168. dps:
  169. - id: 66
  170. type: boolean
  171. optional: true
  172. name: sensor
  173. mapping:
  174. - dps_val: offline
  175. value: false
  176. - dps_val: online
  177. value: true
  178. # if missing, assume online as we can reach it
  179. - dps_val: null
  180. value: true