getDoorState method
Implementation
Future<Map<String, dynamic>> getDoorState(String serialNumber) async {
try {
return await this._getDeviceState(
serialNumber, constants['stateAttributes']!['doorState'] as String?);
} on MyQError catch (e) {
if (e.code == constants['codes']!['DEVICE_STATE_NOT_FOUND']) {
throw MyQError(
'device with serial number "$serialNumber" is not a door',
'Invalid Device');
}
throw e;
}
}