Skip to content

Commit c476dfb

Browse files
committed
Remove typescript-string-operations
1 parent f63509f commit c476dfb

3 files changed

Lines changed: 3 additions & 28 deletions

File tree

package-lock.json

Lines changed: 1 addition & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"ha-template": "^1.2.2",
3030
"home-assistant-js-websocket": "^9.2.1",
3131
"lit": "^2.0.0",
32-
"lodash": "^4.17.21",
33-
"typescript-string-operations": "^1.4.1"
32+
"lodash": "^4.17.21"
3433
},
3534
"devDependencies": {
3635
"@babel/core": "^7.9.6",

src/vacuum-card.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
VacuumActionParams,
2323
} from './types';
2424
import DEFAULT_IMAGE from './vacuum.svg';
25-
import { String } from 'typescript-string-operations';
2625

2726
registerTemplates();
2827

@@ -83,19 +82,7 @@ export class VacuumCard extends LitElement {
8382
return null;
8483
}
8584

86-
const entity_type = 'select';
87-
const waterLevel = this.config.water_level;
88-
if (!waterLevel.startsWith(entity_type)) {
89-
throw new Error(
90-
String.Format(
91-
localize('error.domain_not_supported') || '',
92-
entity_type,
93-
waterLevel.split('.')[0],
94-
),
95-
);
96-
}
97-
98-
return waterLevel;
85+
return this.config.water_level;
9986
}
10087

10188
get waterLevel(): HassEntity | null {

0 commit comments

Comments
 (0)