diff --git a/src/xiaomi-vacuum-map-card.ts b/src/xiaomi-vacuum-map-card.ts index dbc211a8..2b4209e7 100644 --- a/src/xiaomi-vacuum-map-card.ts +++ b/src/xiaomi-vacuum-map-card.ts @@ -994,7 +994,8 @@ export class XiaomiVacuumMapCard extends LitElement { private static adjustRoomId(roomId: string | number, config: MapMode): string | number { if (config.idType === "number") { - return +roomId; + const roomIdAsNumber = +roomId; + return isNaN(roomIdAsNumber) ? roomId : roomIdAsNumber; } return roomId; }