Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny Bugfix + Updated Italian translation #372

Merged
merged 5 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cards/title-card/title-card.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HomeAssistant, LovelaceCard, LovelaceCardEditor } from "custom-card-helpers";
import { UnsubscribeFunc } from "home-assistant-js-websocket";
import { Connection, UnsubscribeFunc } from "home-assistant-js-websocket";
import { css, CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators.js";
import "../../shared/shape-icon";
Expand Down
24 changes: 24 additions & 0 deletions src/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,30 @@
},
"vacuum": {
"commands": "Comandi"
},
"media-player": {
"use_media_info": "Mostra le Informazioni Sorgente",
"use_media_artwork": "Usa la copertina della Sorgente",
"media_controls": "Controlli Media",
"media_controls_list": {
"on_off": "Accendi/Spegni",
"shuffle": "Riproduzione Casuale",
"previous": "Traccia Precedente",
"play_pause_stop": "Play/Pausa/Stop",
"next": "Traccia Successiva",
"repeat": "Loop"
},
"volume_controls": "Controlli del Volume",
"volume_controls_list": {
"volume_buttons": "Bottoni del Volume",
"volume_set": "Livello del Volume",
"volume_mute": "Silenzia"
}
},
"lock": {
"lock": "Blocca",
"unlock": "Sblocca",
"open": "Aperto"
}
},
"chip": {
Expand Down
4 changes: 4 additions & 0 deletions src/utils/icons/cover-icon.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { HassEntity } from "home-assistant-js-websocket";
import { state } from "lit/decorators";
alessandroias marked this conversation as resolved.
Show resolved Hide resolved

export const coverIcon = (state?: string, entity?: HassEntity): string => {
const open = state !== "closed";
Expand Down Expand Up @@ -91,6 +92,7 @@ export const coverIcon = (state?: string, entity?: HassEntity): string => {
export const computeOpenIcon = (stateObj: HassEntity): string => {
switch (stateObj.attributes.device_class) {
case "awning":
case "curtain":
case "door":
case "gate":
return "mdi:arrow-expand-horizontal";
Expand All @@ -100,8 +102,10 @@ export const computeOpenIcon = (stateObj: HassEntity): string => {
};

export const computeCloseIcon = (stateObj: HassEntity): string => {
console.log(stateObj.attributes);
alessandroias marked this conversation as resolved.
Show resolved Hide resolved
switch (stateObj.attributes.device_class) {
case "awning":
case "curtain":
case "door":
case "gate":
return "mdi:arrow-collapse-horizontal";
Expand Down