Skip to content

Commit

Permalink
Adding mount type, might want to use this
Browse files Browse the repository at this point in the history
  • Loading branch information
terafin committed Oct 14, 2024
1 parent c3d9e1f commit b5303c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mqtt-unifi-protect-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,13 @@ ufp.on("message", (packet) => {
var sensor_supports_humidity = false
var sensor_supports_temperature = false
var sensor_supports_light = false
var sensor_mount_type = false

sensors.forEach(sensor_record => {
if (sensor_record.id == id) {
logging.debug("sensor record: " + JSON.stringify(sensor_record))
sensor_name = sensor_record.name.toLowerCase()
sensor_mount_type = sensor_record.mountType
sensor_supports_motion = sensor_record.motionSettings.isEnabled
sensor_supports_humidity = sensor_record.humiditySettings.isEnabled
sensor_supports_temperature = sensor_record.temperatureSettings.isEnabled
Expand Down

0 comments on commit b5303c2

Please sign in to comment.