smartplugv2_energyv2.yaml 3.7 KB

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