Skip to content

Commit

Permalink
Add hass object to state badge
Browse files Browse the repository at this point in the history
This get's passed to ha-state-icon and is needed to handle changes in:

https://developers.home-assistant.io/blog/2024/01/30/ha-state-icon-properties-changes/
  • Loading branch information
elupus authored Feb 7, 2024
1 parent 22547e6 commit ca2afac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const renderIcon = (stateObj: HomeAssistantEntity, config: RoomCardEntity

return html`<state-badge
class="icon-small ${classes}"
.hass=${hass}
.stateObj="${stateObj}"
.overrideIcon="${isObject(customIcon) ? (customIcon as EntityCondition).icon : customIcon as string}"
.stateColor="${config.state_color}"
Expand Down

0 comments on commit ca2afac

Please sign in to comment.