smartplug_usb.yaml 2.9 KB

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