Skip to content

Commit

Permalink
Merge pull request #611 from PiotrMachowski/dev
Browse files Browse the repository at this point in the history
v2.2.2
  • Loading branch information
PiotrMachowski authored Jun 7, 2023
2 parents d610bf0 + 63f1b2f commit 460bcea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xiaomi-vacuum-map-card",
"version": "v2.2.1",
"version": "v2.2.2",
"description": "Xiaomi Vacuum Map Card",
"keywords": [
"home-assistant",
Expand Down
1 change: 1 addition & 0 deletions src/components/tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class Tile extends RootlessLitElement {
}
this.className = `tile-wrapper clickable ripple ${this.config.tile_id ? `tile-${this.config.tile_id}-wrapper` : ""}`;
const stateObj = this.config.entity ? this.hass.states[this.config.entity] : undefined;
if (!stateObj) return;
const title = this.getTileLabel(stateObj);
const value = this.getTileValue(stateObj);
const icon = this.getIcon(stateObj);
Expand Down
2 changes: 1 addition & 1 deletion src/localize/hass/compute_attribute_display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const computeAttributeValueDisplay = (
const entityId = stateObj.entity_id;
const domain = computeDomain(entityId);
const deviceClass = stateObj.attributes.device_class;
const registryEntry = entities[entityId] as
const registryEntry = entities?.[entityId] as
| EntityRegistryDisplayEntry
| undefined;
const translationKey = registryEntry?.translation_key;
Expand Down
2 changes: 1 addition & 1 deletion src/localize/hass/compute_state_display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const computeStateDisplay = (
entities: HomeAssistantFixed["entities"],
state?: string
): string => {
const entity = entities[stateObj.entity_id] as
const entity = entities?.[stateObj.entity_id] as
| EntityRegistryDisplayEntry
| undefined;

Expand Down

0 comments on commit 460bcea

Please sign in to comment.