smartplug_usb.yaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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. hidden: true
  107. dps:
  108. - id: 17
  109. type: integer
  110. optional: true
  111. name: sensor
  112. unit: kWh
  113. class: total_increasing
  114. mapping:
  115. - scale: 1000
  116. - entity: time
  117. category: config
  118. translation_key: timer
  119. hidden: unavailable
  120. dps:
  121. - id: 9
  122. type: integer
  123. optional: true
  124. name: second
  125. range:
  126. min: 0
  127. max: 86400
  128. - id: 9
  129. type: integer
  130. optional: true
  131. name: available
  132. mapping:
  133. - dps_val: null
  134. value: false
  135. - value: true
  136. - entity: time
  137. category: config
  138. translation_key: timer_x
  139. translation_placeholders:
  140. x: USB
  141. hidden: unavailable
  142. dps:
  143. - id: 15
  144. type: integer
  145. optional: true
  146. name: second
  147. range:
  148. min: 0
  149. max: 86400
  150. - id: 15
  151. type: integer
  152. optional: true
  153. name: available
  154. mapping:
  155. - dps_val: null
  156. value: false
  157. - value: true
  158. - entity: select
  159. translation_key: initial_state
  160. category: config
  161. hidden: unavailable
  162. dps:
  163. - id: 38
  164. type: string
  165. optional: true
  166. name: option
  167. mapping:
  168. - dps_val: power_on
  169. value: "on"
  170. available: alternate
  171. - dps_val: power_off
  172. value: "off"
  173. available: alternate
  174. - dps_val: last
  175. value: memory
  176. available: alternate
  177. - dps_val: "on"
  178. value: "on"
  179. available: standard
  180. - dps_val: "off"
  181. value: "off"
  182. available: standard
  183. - dps_val: memory
  184. value: memory
  185. available: standard
  186. - dps_val: "0"
  187. value: "off"
  188. available: numeric
  189. - dps_val: "1"
  190. value: "on"
  191. available: numeric
  192. - dps_val: "2"
  193. value: memory
  194. available: numeric
  195. - id: 38
  196. type: string
  197. optional: true
  198. name: standard
  199. mapping:
  200. - value: false
  201. conditions:
  202. - dps_val: ["on", "off", memory]
  203. value: true
  204. - dps_val: null
  205. value: true # allow options to populate at init
  206. - id: 38
  207. type: string
  208. optional: true
  209. name: alternate
  210. mapping:
  211. - value: false
  212. conditions:
  213. - dps_val: [power_on, power_off, last]
  214. value: true
  215. - id: 38
  216. type: string
  217. optional: true
  218. name: numeric
  219. mapping:
  220. - value: false
  221. conditions:
  222. - dps_val: ["0", "1", "2"]
  223. value: true
  224. - id: 38
  225. type: string
  226. optional: true
  227. name: available
  228. mapping:
  229. - dps_val: null
  230. value: false
  231. - value: true
  232. - entity: select
  233. translation_key: light_mode
  234. category: config
  235. hidden: unavailable
  236. dps:
  237. - id: 39
  238. type: string
  239. name: option
  240. optional: true
  241. mapping:
  242. - dps_val: relay
  243. value: state
  244. - dps_val: pos
  245. value: locator
  246. - dps_val: none
  247. value: "off"
  248. - id: 39
  249. type: string
  250. optional: true
  251. name: available
  252. mapping:
  253. - dps_val: null
  254. value: false
  255. - value: true
  256. - entity: lock
  257. translation_key: child_lock
  258. category: config
  259. hidden: unavailable
  260. dps:
  261. - id: 40
  262. type: boolean
  263. optional: true
  264. name: lock
  265. - id: 40
  266. type: boolean
  267. optional: true
  268. name: available
  269. mapping:
  270. - dps_val: null
  271. value: false
  272. - value: true
  273. - entity: binary_sensor
  274. class: problem
  275. category: diagnostic
  276. dps:
  277. - id: 26
  278. type: bitfield
  279. name: sensor
  280. optional: true
  281. mapping:
  282. - dps_val: 0
  283. value: false
  284. - value: true
  285. - id: 26
  286. type: bitfield
  287. name: fault_code
  288. optional: true
  289. - entity: text
  290. translation_key: schedule
  291. category: config
  292. hidden: true
  293. dps:
  294. - id: 41
  295. type: base64
  296. optional: true
  297. name: value
  298. - entity: text
  299. name: Randomized schedule
  300. category: config
  301. icon: "mdi:island"
  302. hidden: true
  303. dps:
  304. - id: 42
  305. type: base64
  306. optional: true
  307. name: value
  308. - entity: text
  309. name: Inching
  310. category: config
  311. icon: "mdi:toggle-switch"
  312. hidden: true
  313. dps:
  314. - id: 43
  315. type: string
  316. optional: true
  317. name: value