Skip to content

Commit

Permalink
Not using the correct attribute when conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcokreeft87 committed Sep 12, 2022
1 parent 7fd7b4c commit 8852d1a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### Features

{% if version_installed.replace("v", "").replace(".","") | int < 135 %}
- Fixed `Bug not using the correct attribute when using conditions`
{% endif %}

{% if version_installed.replace("v", "").replace(".","") | int < 134 %}
- Fixed `Main entity no longer required`
{% endif %}
Expand Down
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.4",
"version": "1.3.5",
"description": "Show entities in Home Assistant's Lovelace UI",
"keywords": [
"home-assistant",
Expand Down
2 changes: 1 addition & 1 deletion room-card.js

Large diffs are not rendered by default.

Binary file modified room-card.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const renderConditionIcons = (stateObj: HomeAssistantEntity, config: Room

if(item.entity) {
const entity = hass.states[item.entity];
entityValue = config.attribute ? entity.attributes[item.attribute] : entity.state;
entityValue = item.attribute ? entity.attributes[item.attribute] : entity.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.4',
'%c ROOM-CARD %c 1.3.5',
'color: cyan; background: black; font-weight: bold;',
'color: darkblue; background: white; font-weight: bold;'
);
Expand Down

0 comments on commit 8852d1a

Please sign in to comment.