Skip to content

Commit

Permalink
feat: make power-flow-card available from the ui picker (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulic75 authored May 12, 2022
1 parent 95dfe82 commit fa16d3d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/power-flow-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,17 @@ export class PowerFlowCard extends LitElement {
`;
}

const windowWithCards = window as unknown as Window & {
customCards: unknown[];
};
windowWithCards.customCards = windowWithCards.customCards || [];
windowWithCards.customCards.push({
type: "power-flow-card",
name: "Power Flow Card",
description:
"A power distribution card inspired by the official Energy Distribution card for Home Assistant",
});

declare global {
interface HTMLElementTagNameMap {
"power-flow-card": PowerFlowCard;
Expand Down

0 comments on commit fa16d3d

Please sign in to comment.