smartplug_usb.yaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. name: Smartplug with USB
  2. products:
  3. - id: zmql6aexy8ua5rox
  4. manufacturer: Gosund
  5. model: SP112
  6. - id: re5wqraswcozglky
  7. manufacturer: Gosund
  8. model: SP6
  9. entities:
  10. - entity: switch
  11. class: outlet
  12. dps:
  13. - id: 1
  14. type: boolean
  15. name: switch
  16. - id: 21
  17. type: bitfield
  18. name: factory_test
  19. optional: true
  20. - entity: switch
  21. name: USB
  22. icon: "mdi:usb"
  23. dps:
  24. - id: 7
  25. type: boolean
  26. name: switch
  27. - entity: sensor
  28. category: diagnostic
  29. class: voltage
  30. hidden: unavailable
  31. dps:
  32. - id: 20
  33. name: sensor
  34. type: integer
  35. class: measurement
  36. optional: true
  37. force: true
  38. unit: V
  39. mapping:
  40. - scale: 10
  41. - id: 22
  42. type: integer
  43. name: calibration
  44. optional: true
  45. - id: 20
  46. type: integer
  47. optional: true
  48. name: available
  49. mapping:
  50. - dps_val: null
  51. value: false
  52. - value: true
  53. - entity: sensor
  54. category: diagnostic
  55. class: current
  56. hidden: unavailable
  57. dps:
  58. - id: 18
  59. name: sensor
  60. type: integer
  61. class: measurement
  62. force: true
  63. optional: true
  64. unit: mA
  65. - id: 23
  66. type: integer
  67. name: calibration
  68. optional: true
  69. - id: 18
  70. type: integer
  71. optional: true
  72. name: available
  73. mapping:
  74. - dps_val: null
  75. value: false
  76. - value: true
  77. - entity: sensor
  78. category: diagnostic
  79. class: power
  80. hidden: unavailable
  81. dps:
  82. - id: 19
  83. name: sensor
  84. type: integer
  85. class: measurement
  86. force: true
  87. optional: true
  88. unit: W
  89. mapping:
  90. - scale: 10
  91. - id: 24
  92. type: integer
  93. name: calibration
  94. optional: true
  95. - id: 19
  96. type: integer
  97. optional: true
  98. name: available
  99. mapping:
  100. - dps_val: null
  101. value: false
  102. - value: true
  103. - entity: sensor
  104. class: energy
  105. category: diagnostic
  106. dps:
  107. - id: 17
  108. type: integer
  109. name: sensor
  110. unit: kWh
  111. class: total_increasing
  112. mapping:
  113. - scale: 1000
  114. - entity: time
  115. category: config
  116. translation_key: timer
  117. hidden: unavailable
  118. dps:
  119. - id: 9
  120. type: integer
  121. optional: true
  122. name: second
  123. range:
  124. min: 0
  125. max: 86400
  126. - id: 9
  127. type: integer
  128. optional: true
  129. name: available
  130. mapping:
  131. - dps_val: null
  132. value: false
  133. - value: true
  134. - entity: time
  135. category: config
  136. translation_key: timer_x
  137. translation_placeholders:
  138. x: USB
  139. hidden: unavailable
  140. dps:
  141. - id: 15
  142. type: integer
  143. optional: true
  144. name: second
  145. range:
  146. min: 0
  147. max: 86400
  148. - id: 15
  149. type: integer
  150. optional: true
  151. name: available
  152. mapping:
  153. - dps_val: null
  154. value: false
  155. - value: true
  156. - entity: select
  157. translation_key: initial_state
  158. category: config
  159. hidden: unavailable
  160. dps:
  161. - id: 38
  162. type: string
  163. optional: true
  164. name: option
  165. mapping:
  166. - dps_val: power_on
  167. value: "on"
  168. available: alternate
  169. - dps_val: power_off
  170. value: "off"
  171. available: alternate
  172. - dps_val: last
  173. value: memory
  174. available: alternate
  175. - dps_val: "on"
  176. value: "on"
  177. available: standard
  178. - dps_val: "off"
  179. value: "off"
  180. available: standard
  181. - dps_val: memory
  182. value: memory
  183. available: standard
  184. - dps_val: "0"
  185. value: "off"
  186. available: numeric
  187. - dps_val: "1"
  188. value: "on"
  189. available: numeric
  190. - dps_val: "2"
  191. value: memory
  192. available: numeric
  193. - id: 38
  194. type: string
  195. optional: true
  196. name: standard
  197. mapping:
  198. - value: false
  199. conditions:
  200. - dps_val: ["on", "off", memory]
  201. value: true
  202. - dps_val: null
  203. value: true # allow options to populate at init
  204. - id: 38
  205. type: string
  206. optional: true
  207. name: alternate
  208. mapping:
  209. - value: false
  210. conditions:
  211. - dps_val: [power_on, power_off, last]
  212. value: true
  213. - id: 38
  214. type: string
  215. optional: true
  216. name: numeric
  217. mapping:
  218. - value: false
  219. conditions:
  220. - dps_val: ["0", "1", "2"]
  221. value: true
  222. - id: 38
  223. type: string
  224. optional: true
  225. name: available
  226. mapping:
  227. - dps_val: null
  228. value: false
  229. - value: true
  230. - entity: select
  231. translation_key: light_mode
  232. category: config
  233. hidden: unavailable
  234. dps:
  235. - id: 39
  236. type: string
  237. name: option
  238. optional: true
  239. mapping:
  240. - dps_val: relay
  241. value: state
  242. - dps_val: pos
  243. value: locator
  244. - dps_val: none
  245. value: "off"
  246. - id: 39
  247. type: string
  248. optional: true
  249. name: available
  250. mapping:
  251. - dps_val: null
  252. value: false
  253. - value: true
  254. - entity: lock
  255. translation_key: child_lock
  256. category: config
  257. hidden: unavailable
  258. dps:
  259. - id: 40
  260. type: boolean
  261. optional: true
  262. name: lock
  263. - id: 40
  264. type: boolean
  265. optional: true
  266. name: available
  267. mapping:
  268. - dps_val: null
  269. value: false
  270. - value: true
  271. - entity: binary_sensor
  272. class: problem
  273. category: diagnostic
  274. dps:
  275. - id: 26
  276. type: bitfield
  277. name: sensor
  278. optional: true
  279. mapping:
  280. - dps_val: 0
  281. value: false
  282. - value: true
  283. - id: 26
  284. type: bitfield
  285. name: fault_code
  286. optional: true
  287. - entity: text
  288. translation_key: schedule
  289. category: config
  290. hidden: true
  291. dps:
  292. - id: 41
  293. type: base64
  294. optional: true
  295. name: value
  296. - entity: text
  297. name: Randomized schedule
  298. category: config
  299. icon: "mdi:island"
  300. hidden: true
  301. dps:
  302. - id: 42
  303. type: base64
  304. optional: true
  305. name: value
  306. - entity: text
  307. name: Inching
  308. category: config
  309. icon: "mdi:toggle-switch"
  310. hidden: true
  311. dps:
  312. - id: 43
  313. type: string
  314. optional: true
  315. name: value