From c0152ee0e51ee842c9520aabec35a30c4e9b3ef4 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Wed, 19 Oct 2022 21:01:16 -0300 Subject: [PATCH] Format file --- src/utils/icons/domain-icon.ts | 72 +++++++++++++++++----------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/utils/icons/domain-icon.ts b/src/utils/icons/domain-icon.ts index 0ea99d10..af11268d 100644 --- a/src/utils/icons/domain-icon.ts +++ b/src/utils/icons/domain-icon.ts @@ -101,42 +101,42 @@ export function domainIcon(domain: string, entity?: HassEntity, state?: string): return 'mdi:lock'; } - // Taken from https://github.com/home-assistant/frontend/blob/45646eaf0bfc86aa0d0d6b73809ef0b32abb5729/src/common/entity/domain_icon.ts#L138-L172 - case "media_player": - switch (entity?.attributes.device_class) { - case "speaker": - switch (state) { - case "playing": - return 'mdi:speaker-play'; - case "paused": - return 'mdi:speaker-pause'; - case "off": - return 'mdi:speaker-off'; - default: - return 'mdi:speaker'; - } - case "tv": - switch (state) { - case "playing": - return 'mdi:television-play'; - case "paused": - return 'mdi:television-pause'; - case "off": - return 'mdi:television-off'; - default: - return 'mdi:television'; - } - default: - switch (state) { - case "playing": - case "paused": - return 'mdi:cast-connected'; - case "off": - return 'mdi:cast-off'; - default: - return 'mdi:cast'; - } - } + // Taken from https://github.com/home-assistant/frontend/blob/45646eaf0bfc86aa0d0d6b73809ef0b32abb5729/src/common/entity/domain_icon.ts#L138-L172 + case 'media_player': + switch (entity?.attributes.device_class) { + case 'speaker': + switch (state) { + case 'playing': + return 'mdi:speaker-play'; + case 'paused': + return 'mdi:speaker-pause'; + case 'off': + return 'mdi:speaker-off'; + default: + return 'mdi:speaker'; + } + case 'tv': + switch (state) { + case 'playing': + return 'mdi:television-play'; + case 'paused': + return 'mdi:television-pause'; + case 'off': + return 'mdi:television-off'; + default: + return 'mdi:television'; + } + default: + switch (state) { + case 'playing': + case 'paused': + return 'mdi:cast-connected'; + case 'off': + return 'mdi:cast-off'; + default: + return 'mdi:cast'; + } + } case 'switch': switch (entity?.attributes.device_class) {