mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-11-03 10:50:55 +08:00
Revert "Remove unused support for bridge devices"
This reverts commit 30ebbb70bb.
This commit is contained in:
14
devices/bridge.js
Normal file
14
devices/bridge.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import RingSocketDevice from './base-socket-device.js'
|
||||
|
||||
export default class Bridge extends RingSocketDevice {
|
||||
constructor(deviceInfo) {
|
||||
super(deviceInfo, 'alarm', 'commStatus')
|
||||
this.deviceData.mdl = 'Bridge'
|
||||
this.deviceData.name = this.device.location.name + ' Bridge'
|
||||
}
|
||||
|
||||
publishState() {
|
||||
// This device only has attributes and attribute based entities
|
||||
this.publishAttributes()
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import BaseStation from '../devices/base-station.js'
|
||||
import Beam from '../devices/beam.js'
|
||||
import BeamOutdoorPlug from '../devices/beam-outdoor-plug.js'
|
||||
import BinarySensor from '../devices/binary-sensor.js'
|
||||
import Bridge from '../devices/bridge.js'
|
||||
import Camera from '../devices/camera.js'
|
||||
import CoAlarm from '../devices/co-alarm.js'
|
||||
import Chime from '../devices/chime.js'
|
||||
@@ -237,11 +238,11 @@ export default new class RingMqtt {
|
||||
ringDevice = await this.getDevice(device, allDevices, events)
|
||||
switch (ringDevice) {
|
||||
case 'not-supported':
|
||||
// Save unsupported device type for log output later
|
||||
// Save unsupported device type
|
||||
unsupportedDevices.push(device.deviceType)
|
||||
case 'ignore':
|
||||
ringDevice=false
|
||||
break;
|
||||
break
|
||||
default:
|
||||
this.devices.push(ringDevice)
|
||||
}
|
||||
@@ -345,6 +346,8 @@ export default new class RingMqtt {
|
||||
return new BaseStation(deviceInfo)
|
||||
case RingDeviceType.RangeExtender:
|
||||
return new RangeExtender(deviceInfo)
|
||||
case RingDeviceType.RingNetAdapter:
|
||||
return new Bridge(deviceInfo)
|
||||
case 'location.mode':
|
||||
return new ModesPanel(deviceInfo)
|
||||
case 'siren':
|
||||
@@ -359,7 +362,6 @@ export default new class RingMqtt {
|
||||
return new TemperatureSensor(deviceInfo)
|
||||
}
|
||||
case RingDeviceType.BeamsSwitch:
|
||||
case RingDeviceType.RingNetAdapter:
|
||||
case 'access-code':
|
||||
case 'access-code.vault':
|
||||
case 'adapter.sidewalk':
|
||||
|
||||
Reference in New Issue
Block a user