smartplug_usb.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. name: Smartplug with USB
  2. products:
  3. - id: zmql6aexy8ua5rox
  4. manufacturer: Gosund
  5. model: SP112
  6. entities:
  7. - entity: switch
  8. class: outlet
  9. dps:
  10. - id: 1
  11. type: boolean
  12. name: switch
  13. - id: 21
  14. type: bitfield
  15. name: factory_test
  16. optional: true
  17. - entity: switch
  18. name: USB
  19. icon: "mdi:usb"
  20. dps:
  21. - id: 7
  22. type: boolean
  23. name: switch
  24. - entity: sensor
  25. category: diagnostic
  26. class: voltage
  27. dps:
  28. - id: 20
  29. name: sensor
  30. type: integer
  31. class: measurement
  32. optional: true
  33. force: true
  34. unit: V
  35. mapping:
  36. - scale: 10
  37. - id: 22
  38. type: integer
  39. name: calibration
  40. optional: true
  41. - entity: sensor
  42. category: diagnostic
  43. class: current
  44. dps:
  45. - id: 18
  46. name: sensor
  47. type: integer
  48. class: measurement
  49. force: true
  50. optional: true
  51. unit: mA
  52. - id: 23
  53. type: integer
  54. name: calibration
  55. optional: true
  56. - entity: sensor
  57. category: diagnostic
  58. class: power
  59. dps:
  60. - id: 19
  61. name: sensor
  62. type: integer
  63. class: measurement
  64. force: true
  65. optional: true
  66. unit: W
  67. mapping:
  68. - scale: 10
  69. - id: 24
  70. type: integer
  71. name: calibration
  72. optional: true
  73. - entity: number
  74. category: config
  75. name: Outlet timer
  76. class: duration
  77. translation_key: timer
  78. dps:
  79. - id: 9
  80. type: integer
  81. name: value
  82. unit: min
  83. range:
  84. min: 0
  85. max: 86400
  86. mapping:
  87. - scale: 60
  88. step: 60
  89. - entity: number
  90. name: USB timer
  91. category: config
  92. class: duration
  93. translation_key: timer
  94. dps:
  95. - id: 15
  96. type: integer
  97. name: value
  98. unit: min
  99. range:
  100. min: 0
  101. max: 86400
  102. mapping:
  103. - scale: 60
  104. step: 60
  105. - entity: select
  106. translation_key: initial_state
  107. category: config
  108. dps:
  109. - id: 38
  110. type: string
  111. optional: true
  112. name: option
  113. mapping:
  114. - dps_val: power_on
  115. value: "on"
  116. - dps_val: power_off
  117. value: "off"
  118. - dps_val: last
  119. value: memory
  120. - entity: select
  121. name: Indicator
  122. icon: "mdi:led-on"
  123. category: config
  124. dps:
  125. - id: 39
  126. type: string
  127. name: option
  128. optional: true
  129. mapping:
  130. - dps_val: relay
  131. value: State
  132. - dps_val: pos
  133. value: Position
  134. - dps_val: none
  135. value: "Off"
  136. - entity: binary_sensor
  137. class: problem
  138. category: diagnostic
  139. dps:
  140. - id: 26
  141. type: bitfield
  142. name: sensor
  143. optional: true
  144. mapping:
  145. - dps_val: 0
  146. value: false
  147. - value: true
  148. - id: 26
  149. type: bitfield
  150. name: fault_code
  151. optional: true