Skip to content

Commit

Permalink
add camera to security
Browse files Browse the repository at this point in the history
  • Loading branch information
Lebe1ge committed Nov 13, 2024
1 parent 499ae21 commit 532d9ea
Show file tree
Hide file tree
Showing 9 changed files with 331 additions and 32 deletions.
11 changes: 11 additions & 0 deletions custom_components/linus_dashboard/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,16 @@
"connection": "Unable to connect to the server.",
"unknown": "Unknown error occurred."
}
},
"entity": {
"switch": {
"pre-release": {
"name": "Pre-release",
"state": {
"off": "No pre-releases",
"on": "Pre-releases preferred"
}
}
}
}
}
157 changes: 146 additions & 11 deletions custom_components/linus_dashboard/www/linus-strategy.js

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
colorlog==6.8.2
homeassistant==2024.10.2
homeassistant==2024.11.1
pip>=21.3.1
ruff==0.6.7
2 changes: 1 addition & 1 deletion src/cards/ControllerCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ControllerCard {
if (this.#defaultConfig.title) {
cards.push({
type: "heading",
heading: this.#defaultConfig.title,
heading: this.#defaultConfig.title ?? "No title",
icon: this.#defaultConfig.titleIcon,
heading_style: "title",
badges: [],
Expand Down
13 changes: 5 additions & 8 deletions src/cards/PersonCard.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {AbstractCard} from "./AbstractCard";
import {cards} from "../types/strategy/cards";
import {EntityRegistryEntry} from "../types/homeassistant/data/entity_registry";
import {PersonCardConfig} from "../types/lovelace-mushroom/cards/person-card-config";
import { AbstractCard } from "./AbstractCard";
import { cards } from "../types/strategy/cards";
import { EntityRegistryEntry } from "../types/homeassistant/data/entity_registry";
import { PersonCardConfig } from "../types/lovelace-mushroom/cards/person-card-config";

/**
* Person Card Class
Expand All @@ -20,9 +20,6 @@ class PersonCard extends AbstractCard {
*/
#defaultConfig: PersonCardConfig = {
type: "custom:mushroom-person-card",
layout: "vertical",
primary_info: "none",
secondary_info: "none",
icon_type: "entity-picture",
};

Expand All @@ -40,4 +37,4 @@ class PersonCard extends AbstractCard {
}
}

export {PersonCard};
export { PersonCard };
11 changes: 11 additions & 0 deletions src/views/AbstractView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ abstract class AbstractView {
return []
}

/**
* Create the cards to include in the view.
*
* @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.
* @override
*/
async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {
return []
}

/**
* Create the cards to include in the view.
*
Expand Down Expand Up @@ -203,6 +213,7 @@ abstract class AbstractView {
...this.config,
cards: await this.createViewCards(),
sections: await this.createSectionCards(),
badges: await this.createSectionBadges(),
};
}

Expand Down
Loading

0 comments on commit 532d9ea

Please sign in to comment.