smartplugv2_energyv2.yaml 3.7 KB

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