Skip to content

Commit

Permalink
real fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcokreeft87 committed Sep 12, 2022
1 parent 8852d1a commit 4d14ea0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "room-card",
"version": "1.3.5",
"version": "1.3.6",
"description": "Show entities in Home Assistant's Lovelace UI",
"keywords": [
"home-assistant",
Expand Down
4 changes: 2 additions & 2 deletions room-card.js

Large diffs are not rendered by default.

Binary file modified room-card.js.gz
Binary file not shown.
4 changes: 4 additions & 0 deletions src/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export const renderConditionIcons = (stateObj: HomeAssistantEntity, config: Room
if(item.entity) {
const entity = hass.states[item.entity];
entityValue = item.attribute ? entity.attributes[item.attribute] : entity.state;
}

if(item.attribute && !item.entity) {
entityValue = item.attribute ? stateObj.attributes[item.attribute] : stateObj.state;
}

return checkConditionalValue(item, entityValue);
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { style } from './styles';
import { HomeAssistantEntity, RoomCardConfig, RoomCardEntity, RoomCardRow } from './types/room-card-types';

console.info(
'%c ROOM-CARD %c 1.3.5',
'%c ROOM-CARD %c 1.3.6',
'color: cyan; background: black; font-weight: bold;',
'color: darkblue; background: white; font-weight: bold;'
);
Expand Down

0 comments on commit 4d14ea0

Please sign in to comment.