smartplugv2_energyv2.yaml 3.3 KB

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