Added support for WRT-01

This commit is contained in:
faanskit 2021-05-05 12:33:30 +02:00 committed by GitHub
parent 39c0658871
commit cbcd33fde6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,7 +270,7 @@ class PlejdApi {
// Unknown // Unknown
return { name: '-unknown-', type: 'light', dimmable: false }; return { name: '-unknown-', type: 'light', dimmable: false };
case 10: case 10:
return { name: '-unknown-', type: 'light', dimmable: false }; return { name: 'WRT-01', type: 'device_automation', dimmable: false };
case 12: case 12:
// Unknown // Unknown
return { name: '-unknown-', type: 'light', dimmable: false }; return { name: '-unknown-', type: 'light', dimmable: false };
@ -380,7 +380,7 @@ class PlejdApi {
// The device does not have an output. It can be assumed to be a WPH-01 or a WRT-01 // The device does not have an output. It can be assumed to be a WPH-01 or a WRT-01
// Filter inputSettings for available buttons // Filter inputSettings for available buttons
const inputSettings = this.siteDetails.inputSettings.filter( const inputSettings = this.siteDetails.inputSettings.filter(
(x) => x.deviceId === device.deviceId && (x.buttonType == 'DirectionUp') || (x.buttonType == 'DirectionDown')); (x) => x.deviceId === device.deviceId && (x.buttonType == 'DirectionUp') || (x.buttonType == 'DirectionDown') || (x.buttonType == 'RotateMesh'));
// For each found button, register the device as an inputDevice // For each found button, register the device as an inputDevice
inputSettings.forEach((input) => { inputSettings.forEach((input) => {