Skip to content

Commit

Permalink
Temp remove new ring methode, it works only must change the old code …
Browse files Browse the repository at this point in the history
…to the new one
  • Loading branch information
steffjenl committed Nov 21, 2024
1 parent 1f86b82 commit fde157a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions library/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,15 @@ class ProtectWebSocket extends BaseClass {
&& typeof updatePacket.payload.type !== 'undefined'
&& updatePacket.payload.type === 'ring'
) {
// get doorbell driver
const driverDoorbell = this.homey.drivers.getDriver('protectdoorbell');
// Get device from camera id
const deviceDoorbell = driverDoorbell.getUnifiDeviceById(updatePacket.action.recordId);
if (deviceDoorbell) {
// Parse Websocket payload message
driverDoorbell.onParseWebsocketMessage(deviceDoorbell, payload, updatePacket.action.action, updatePacket.action.id);
}
// TODO: implement ring event and remove old doorbell code
// // get doorbell driver
// const driverDoorbell = this.homey.drivers.getDriver('protectdoorbell');
// // Get device from camera id
// const deviceDoorbell = driverDoorbell.getUnifiDeviceById(updatePacket.action.recordId);
// if (deviceDoorbell) {
// // Parse Websocket payload message
// driverDoorbell.onParseWebsocketMessage(deviceDoorbell, payload, updatePacket.action.action, updatePacket.action.id);
// }
} else if (
typeof updatePacket.action.modelKey !== 'undefined'
&& updatePacket.action.modelKey === 'nvr'
Expand Down

0 comments on commit fde157a

Please sign in to comment.