processCommand(message, componentCommand) {
        const entityKey = componentCommand.split('/')[0]
        switch (componentCommand) {
            case 'light/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setLightState(message)
                }
                break;
            case 'siren/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setSirenState(message)
                }
                break;
            case 'snapshot/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setSnapshotInterval(message)
                }
                break;
            case 'snapshot_interval/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setSnapshotInterval(message)
                }
                break;
            default:
                debug('Somehow received message to unknown state topic for camera '+this.deviceId)
        }
    }
// Process messages from MQTT command topic
Process messages from MQTT command topic
Process messages from MQTT command topic
processCommand(message, componentCommand) {
        const entityKey = componentCommand.split('/')[0]
        switch (componentCommand) {
            case 'light/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setLightState(message)
                }
                break;
            case 'siren/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setSirenState(message)
                }
                break;
            case 'snapshot/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setSnapshotInterval(message)
                }
                break;
            case 'snapshot_interval/command':
                if (this.entity.hasOwnProperty(entityKey)) {
                    this.setSnapshotInterval(message)
                }
                break;
            default:
                debug('Somehow received message to unknown state topic for camera '+this.deviceId)
        }
    }
processCommand ( message , componentCommand ) { const entityKey = componentCommand . split ( '/' ) [ 0 ] switch ( componentCommand ) { case 'light/command' : if ( this . entity . hasOwnProperty ( entityKey ) ) { this . setLightState ( message ) } break ; case 'siren/command' : if ( this . entity . hasOwnProperty ( entityKey ) ) { this . setSirenState ( message ) } break ; case 'snapshot/command' : if ( this . entity . hasOwnProperty ( entityKey ) ) { this . setSnapshotInterval ( message ) } break ; case 'snapshot_interval/command' : if ( this . entity . hasOwnProperty ( entityKey ) ) { this . setSnapshotInterval ( message ) } break ; default : debug ( 'Somehow received message to unknown state topic for camera ' + this . deviceId ) } }
Process messages from MQTT command topic
Process messages from MQTT command topic