nexsmart_air2_camera.yaml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. name: Camera
  2. products:
  3. # The product ID (or product_id) from your device information
  4. - id: 0waimqh4mplog68x
  5. manufacturer: Nexsmart
  6. model: AIR 2
  7. entities:
  8. # ------------------------------------
  9. # 1. Main Camera & Snapshot
  10. # ------------------------------------
  11. - entity: event
  12. name: Camera
  13. category: diagnostic
  14. icon: "mdi:camera-burst"
  15. # Snapshot trigger (matches movement_detect_pic: 115)
  16. dps:
  17. - id: 115
  18. name: event
  19. type: base64
  20. optional: true
  21. sensitive: true
  22. mapping:
  23. - dps_val: null
  24. value: null
  25. - value: captured
  26. - id: 115
  27. name: snapshot_data
  28. type: base64
  29. optional: true
  30. sensitive: true
  31. # ------------------------------------
  32. # 2. Battery and Power
  33. # ------------------------------------
  34. - entity: sensor
  35. class: battery
  36. category: diagnostic
  37. # Battery Level Sensor (matches wireless_electricity: 145)
  38. dps:
  39. - id: 145
  40. type: integer
  41. name: sensor
  42. - entity: binary_sensor
  43. class: battery_charging
  44. # Power Mode Sensor (matches wireless_powermode: 146)
  45. dps:
  46. - id: 146
  47. type: string
  48. name: sensor
  49. mapping:
  50. - dps_val: "0"
  51. value: false
  52. - dps_val: "1"
  53. value: true
  54. - entity: binary_sensor
  55. class: connectivity
  56. category: diagnostic
  57. # Awake/Sleep Status (matches wireless_awake: 149)
  58. dps:
  59. - id: 149
  60. type: boolean
  61. name: sensor
  62. - entity: number
  63. name: Low battery threshold
  64. icon: "mdi:battery-alert-variant-outline"
  65. category: config
  66. # Low Battery Threshold (matches wireless_lowpower: 147)
  67. dps:
  68. - id: 147
  69. type: integer
  70. name: value
  71. unit: "%"
  72. # Range is 10-50 based on device dump
  73. range:
  74. min: 10
  75. max: 50
  76. # ------------------------------------
  77. # 3. Basic Configuration
  78. # ------------------------------------
  79. - entity: switch
  80. translation_key: flip_image
  81. category: config
  82. # Flip Image Switch (matches basic_flip: 103)
  83. dps:
  84. - id: 103
  85. type: boolean
  86. name: switch
  87. optional: true
  88. - entity: switch
  89. name: Watermark
  90. category: config
  91. icon: "mdi:watermark"
  92. # Watermark/OSD Switch (matches basic_osd: 104)
  93. dps:
  94. - id: 104
  95. type: boolean
  96. name: switch
  97. optional: true
  98. - entity: select
  99. name: Night vision
  100. icon: "mdi:weather-night"
  101. category: config
  102. # Night Vision Mode Selector(matches basic_nightvision: 108)
  103. dps:
  104. - id: 108
  105. type: string
  106. name: option
  107. optional: true
  108. mapping:
  109. - dps_val: "0"
  110. value: Auto
  111. - dps_val: "1"
  112. value: "Off"
  113. - dps_val: "2"
  114. value: "On"
  115. # ------------------------------------
  116. # 4. Detection & Alarm
  117. # ------------------------------------
  118. - entity: switch
  119. name: Motion detection
  120. icon: "mdi:motion-sensor"
  121. category: config
  122. # PIR Switch (matches ipc_pir_switch: 240)
  123. dps:
  124. - id: 240
  125. type: boolean
  126. name: switch
  127. - entity: number
  128. name: Motion sensitivity
  129. icon: "mdi:ruler-square"
  130. category: config
  131. # PIR Sensitivity (matches ipc_pir_sensitivity: 241)
  132. dps:
  133. - id: 241
  134. type: integer
  135. name: value
  136. # Range is 1-10 based on device dump
  137. range:
  138. min: 1
  139. max: 10
  140. - entity: switch
  141. name: Humanoid filter
  142. icon: "mdi:account-alert"
  143. category: config
  144. # Humanoid Filter (matches humanoid_filter: 170)
  145. dps:
  146. - id: 170
  147. type: boolean
  148. name: switch
  149. # ------------------------------------
  150. # 5. Alarm Mode & Linkage
  151. # ------------------------------------
  152. # V2 does not support this
  153. # ------------------------------------
  154. # 6. Lights & Sirens
  155. # ------------------------------------
  156. # V2 does not support this
  157. # ------------------------------------
  158. # 7. SD Card and Storage
  159. # ------------------------------------
  160. - entity: sensor
  161. name: SD capacity
  162. category: diagnostic
  163. icon: "mdi:micro-sd"
  164. # SD Capacity Sensor (matches sd_storge: 109)
  165. dps:
  166. - id: 109
  167. type: string
  168. name: sensor
  169. optional: true
  170. - entity: sensor
  171. name: SD status
  172. class: enum
  173. translation_key: status
  174. category: diagnostic
  175. icon: "mdi:micro-sd"
  176. # SD Status Sensor (matches sd_status: 110)
  177. dps:
  178. - id: 110
  179. type: integer
  180. name: sensor
  181. optional: true
  182. mapping:
  183. - dps_val: 1
  184. value: normal
  185. - dps_val: 2
  186. value: fault
  187. - dps_val: 3
  188. value: full
  189. - dps_val: 4
  190. value: formatting
  191. - dps_val: 5
  192. value: missing
  193. - dps_val: null
  194. value: normal
  195. - entity: button
  196. name: SD format
  197. category: config
  198. icon: "mdi:micro-sd"
  199. # SD Format Button (matches sd_format: 111) and Status (117)
  200. dps:
  201. - id: 111
  202. type: boolean
  203. name: button
  204. optional: true
  205. persist: false
  206. - id: 117
  207. type: integer
  208. name: state
  209. optional: true
  210. persist: false
  211. mapping:
  212. - dps_val: -20000
  213. value: Unknown
  214. - dps_val: 2000
  215. value: Formatting
  216. - dps_val: 2001
  217. value: Format failed
  218. - dps_val: 2002
  219. value: Card missing
  220. - dps_val: 2003
  221. value: Card error
  222. - dps_val: null
  223. value: Formatted