smartplugv2_energyv2.yaml 3.4 KB

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