From b5303c2ebf56a8e7dd7b89dc2f9c48ef4f07fbd9 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Sun, 13 Oct 2024 18:28:50 -0700 Subject: [PATCH] Adding mount type, might want to use this --- mqtt-unifi-protect-bridge.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mqtt-unifi-protect-bridge.js b/mqtt-unifi-protect-bridge.js index f799d5b..643c9ca 100644 --- a/mqtt-unifi-protect-bridge.js +++ b/mqtt-unifi-protect-bridge.js @@ -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