smartplug_usb.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. name: Smartplug with USB
  2. products:
  3. - id: zmql6aexy8ua5rox
  4. name: Gosund SP112
  5. primary_entity:
  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. - id: 26
  17. type: integer
  18. name: fault_code
  19. optional: true
  20. secondary_entities:
  21. - entity: switch
  22. name: USB
  23. icon: "mdi:usb"
  24. dps:
  25. - id: 7
  26. type: boolean
  27. name: switch
  28. - entity: sensor
  29. category: diagnostic
  30. class: voltage
  31. dps:
  32. - id: 20
  33. name: sensor
  34. type: integer
  35. class: measurement
  36. force: true
  37. unit: V
  38. mapping:
  39. - scale: 10
  40. - id: 22
  41. type: integer
  42. name: calibration
  43. optional: true
  44. - entity: sensor
  45. category: diagnostic
  46. class: current
  47. dps:
  48. - id: 18
  49. name: sensor
  50. type: integer
  51. class: measurement
  52. force: true
  53. unit: mA
  54. - id: 23
  55. type: integer
  56. name: calibration
  57. optional: true
  58. - entity: sensor
  59. category: diagnostic
  60. class: power
  61. dps:
  62. - id: 19
  63. name: sensor
  64. type: integer
  65. class: measurement
  66. force: true
  67. unit: W
  68. mapping:
  69. - scale: 10
  70. - id: 24
  71. type: integer
  72. name: calibration
  73. optional: true
  74. - entity: number
  75. category: config
  76. name: Outlet Timer
  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. 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. name: Initial state
  106. icon: "mdi:toggle-switch"
  107. category: config
  108. dps:
  109. - id: 38
  110. type: string
  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: Last state
  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. mapping:
  128. - dps_val: relay
  129. value: State
  130. - dps_val: pos
  131. value: Position
  132. - dps_val: none
  133. value: "Off"