From 9db765cb548a78754ea13b30f326317114066b3d Mon Sep 17 00:00:00 2001 From: TheSt1tch Date: Sun, 23 Mar 2025 13:32:25 +0500 Subject: [PATCH] fix --- .../hass/dashboard/mushroom-cards.md | 198 +++++++++--------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/docs/smart-home/hass/dashboard/mushroom-cards.md b/docs/smart-home/hass/dashboard/mushroom-cards.md index 8293c7a..7882e09 100644 --- a/docs/smart-home/hass/dashboard/mushroom-cards.md +++ b/docs/smart-home/hass/dashboard/mushroom-cards.md @@ -9,104 +9,104 @@ ??? example title="Пример" ```yaml -type: custom:stack-in-card -cards: - - type: custom:layout-card - layout_type: custom:grid-layout - layout: - grid-template-columns: auto 20px - margin: '-4px -4px -8px -4px' + type: custom:stack-in-card cards: - - type: custom:mushroom-media-player-card - entity: media_player.shield_universal - name: Shield TV - icon: mdi:play - use_media_info: true - use_media_artwork: false - show_volume_level: true - media_controls: - - on_off - - play_pause_stop - - previous - - next - volume_controls: - - volume_set - - volume_mute - fill_container: true - card_mod: - style: | - mushroom-shape-icon { - {% set media_type = state_attr(config.entity, 'media_content_type') %} - --card-mod-icon: - {% if media_type == 'tvshow' %} - mdi:television-classic - {% elif media_type == 'movie' %} - mdi:movie-open - {% elif media_type == 'music' %} - mdi:music - {% elif media_type == 'playlist' %} - mdi:music - {% else %} - mdi:play - {% endif %}; - } - :host { - {% if not is_state(config.entity, 'off') %} - background: url( '{{ state_attr(config.entity, "entity_picture") }}' ), linear-gradient(to left, transparent, rgb(var(--rgb-card-background-color)) 50%); - {% endif %} - background-size: 50%, 100%; - background-position: right; - background-repeat: no-repeat; - background-blend-mode: lighten; - } - :host([dark-mode]) { - background-blend-mode: darken; - } + - type: custom:layout-card + layout_type: custom:grid-layout + layout: + grid-template-columns: auto 20px + margin: '-4px -4px -8px -4px' + cards: + - type: custom:mushroom-media-player-card + entity: media_player.shield_universal + name: Shield TV + icon: mdi:play + use_media_info: true + use_media_artwork: false + show_volume_level: true + media_controls: + - on_off + - play_pause_stop + - previous + - next + volume_controls: + - volume_set + - volume_mute + fill_container: true + card_mod: + style: | + mushroom-shape-icon { + {% set media_type = state_attr(config.entity, 'media_content_type') %} + --card-mod-icon: + {% if media_type == 'tvshow' %} + mdi:television-classic + {% elif media_type == 'movie' %} + mdi:movie-open + {% elif media_type == 'music' %} + mdi:music + {% elif media_type == 'playlist' %} + mdi:music + {% else %} + mdi:play + {% endif %}; + } + :host { + {% if not is_state(config.entity, 'off') %} + background: url( '{{ state_attr(config.entity, "entity_picture") }}' ), linear-gradient(to left, transparent, rgb(var(--rgb-card-background-color)) 50%); + {% endif %} + background-size: 50%, 100%; + background-position: right; + background-repeat: no-repeat; + background-blend-mode: lighten; + } + :host([dark-mode]) { + background-blend-mode: darken; + } - ha-card { - background: none; - --ha-card-box-shadow: 0px; - } - - type: custom:mushroom-template-card - entity: input_boolean.ambilight_dropdown - primary: '' - secondary: '' - icon: >- - {{ 'mdi:chevron-down' if is_state(entity, 'off') else 'mdi:chevron-up' - }} - icon_color: disabled - hold_action: - action: none - card_mod: - style: | - ha-card { - align-items: flex-end; - background: none; - --ha-card-box-shadow: 0px; - } - mushroom-shape-icon { - --shape-color: none !important; - } - - type: conditional - conditions: - - entity: input_boolean.ambilight_dropdown - state: 'on' - card: - type: custom:stack-in-card - cards: - - type: custom:mushroom-light-card - entity: light.ambilight_wled - icon: mdi:television-ambient-light - name: Ambilight - layout: horizontal - show_brightness_control: true - show_color_temp_control: true - show_color_control: true - use_light_color: true - card_mod: - style: | - ha-card { - background: none; - --ha-card-box-shadow: 0px; - } -``` + ha-card { + background: none; + --ha-card-box-shadow: 0px; + } + - type: custom:mushroom-template-card + entity: input_boolean.ambilight_dropdown + primary: '' + secondary: '' + icon: >- + {{ 'mdi:chevron-down' if is_state(entity, 'off') else 'mdi:chevron-up' + }} + icon_color: disabled + hold_action: + action: none + card_mod: + style: | + ha-card { + align-items: flex-end; + background: none; + --ha-card-box-shadow: 0px; + } + mushroom-shape-icon { + --shape-color: none !important; + } + - type: conditional + conditions: + - entity: input_boolean.ambilight_dropdown + state: 'on' + card: + type: custom:stack-in-card + cards: + - type: custom:mushroom-light-card + entity: light.ambilight_wled + icon: mdi:television-ambient-light + name: Ambilight + layout: horizontal + show_brightness_control: true + show_color_temp_control: true + show_color_control: true + use_light_color: true + card_mod: + style: | + ha-card { + background: none; + --ha-card-box-shadow: 0px; + } + ```