smartplugv2_energyv2.yaml 3.6 KB

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