Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: conditional
- conditions:
- - entity: remote.mason_chromecast
- state: 'on'
- card:
- type: custom:expander-card
- card_mod:
- style: |
- /* ─────────────────────────────────────────────────────────────
- 1) When the expander-card ha-card has class="open", hide title-card:
- */
- ha-card.open .title-card {
- display: none !important;
- }
- /* ─────────────────────────────────────────────────────────────
- 2) Always hide the built-in chevron (<iron-icon>) from the expander-button:
- */
- ha-card .expand-button iron-icon {
- display: none !important;
- }
- /* ─────────────────────────────────────────────────────────────
- 3) Inject an MDI “cast” icon before the expand-button (to replace chevron):
- */
- ha-card .expand-button::before {
- font-family: "Material Design Icons";
- /* MDI “cast” codepoint = \e838 */
- content: "\e838";
- font-size: 28px;
- line-height: 1;
- color: var(--primary-text-color);
- }
- title-card:
- type: horizontal-stack
- cards:
- - type: custom:button-card
- icon: mdi:power
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_POWER
- styles:
- card:
- - padding: 4px
- - height: 60px
- - width: 60px
- - background: none
- - box-shadow: none
- - border: none
- icon:
- - color: '#662d91'
- - type: custom:button-card
- icon: mdi:volume-minus
- show_name: false
- tap_action:
- action: call-service
- service: media_player.volume_down
- service_data:
- entity_id: media_player.MasonRokuTV
- styles:
- card:
- - padding: 4px
- - height: 60px
- - width: 60px
- - background: none
- - box-shadow: none
- - border: none
- icon:
- - color: '#662d91'
- - type: custom:button-card
- icon: mdi:play-pause
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_MEDIA_PLAY_PAUSE
- styles:
- card:
- - padding: 4px
- - height: 60px
- - width: 60px
- - background: none
- - box-shadow: none
- - border: none
- icon:
- - color: '#662d91'
- - type: custom:button-card
- icon: mdi:volume-plus
- show_name: false
- tap_action:
- action: call-service
- service: media_player.volume_up
- service_data:
- entity_id: media_player.MasonRokuTV
- styles:
- card:
- - padding: 4px
- - height: 60px
- - width: 60px
- - background: none
- - box-shadow: none
- - border: none
- icon:
- - color: '#662d91'
- title-card-button-overlay: true
- clear: false
- expanded: false
- clear-children: false
- cards:
- - type: custom:mod-card
- card_mod:
- style: |
- ha-card {
- background-color: var(--card-background-color);
- border-radius: 12px;
- box-shadow: var(--ha-card-box-shadow);
- padding: 12px;
- }
- card:
- type: vertical-stack
- cards:
- - type: custom:android-tv-card
- remote_id: remote.mason_chromecast
- slider_id: media_player.mason_chromecast
- keyboard_id: media_player.mason_chromecast_adb
- rows:
- - - back
- - power
- - home
- - - plex
- - pandora
- - youtube
- - - previous
- - play_pause
- - next
- card_mod:
- style: |
- ha-card {
- background: none;
- box-shadow: none;
- border: none;
- padding: 0;
- margin-bottom: 8px;
- }
- .row {
- justify-content: space-between !important;
- width: 100% !important;
- }
- button ha-icon {
- background: linear-gradient(145deg, #ccc, #999, #eee) !important;
- -webkit-background-clip: text !important;
- -webkit-text-fill-color: transparent !important;
- color: transparent !important;
- }
- button[data-type="dpad_center"] ha-icon {
- border-radius: 50%;
- border: 1px solid #444;
- padding: 12px;
- }
- button[data-type="dpad_up"],
- button[data-type="dpad_down"],
- button[data-type="dpad_left"],
- button[data-type="dpad_right"] {
- background: none !important;
- box-shadow: none !important;
- border: none !important;
- }
- - type: custom:mod-card
- card:
- type: grid
- columns: 3
- square: false
- cards:
- - type: custom:button-card
- show_icon: false
- show_name: false
- styles:
- card:
- - display: none
- - type: custom:button-card
- icon: mdi:arrow-up
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_DPAD_UP
- styles:
- card:
- - background: none
- - border: none
- - box-shadow: none
- - height: 120px
- - width: 120px
- icon:
- - background: linear-gradient(145deg, #ccc, #999, #eee) !important
- - -webkit-background-clip: text
- - -webkit-text-fill-color: transparent
- - type: custom:button-card
- show_icon: false
- show_name: false
- styles:
- card:
- - display: none
- - type: custom:button-card
- icon: mdi:arrow-left
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_DPAD_LEFT
- styles:
- card:
- - background: none
- - border: none
- - box-shadow: none
- - height: 120px
- - width: 120px
- icon:
- - background: linear-gradient(145deg, #ccc, #999, #eee) !important
- - -webkit-background-clip: text
- - -webkit-text-fill-color: transparent
- - type: custom:button-card
- icon: mdi:checkbox-blank-circle
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_DPAD_CENTER
- styles:
- card:
- - background: none
- - border-radius: 50%
- - box-shadow: none
- - height: 120px
- - width: 120px
- icon:
- - background: linear-gradient(145deg, #ccc, #999, #eee) !important
- - -webkit-background-clip: text
- - -webkit-text-fill-color: transparent
- - type: custom:button-card
- icon: mdi:arrow-right
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_DPAD_RIGHT
- styles:
- card:
- - background: none
- - border: none
- - box-shadow: none
- - height: 120px
- - width: 120px
- icon:
- - background: linear-gradient(145deg, #ccc, #999, #eee) !important
- - -webkit-background-clip: text
- - -webkit-text-fill-color: transparent
- - type: custom:button-card
- show_icon: false
- show_name: false
- styles:
- card:
- - display: none
- - type: custom:button-card
- icon: mdi:arrow-down
- show_name: false
- tap_action:
- action: call-service
- service: remote.send_command
- service_data:
- entity_id: remote.mason_chromecast
- command: KEYCODE_DPAD_DOWN
- styles:
- card:
- - background: none
- - border: none
- - box-shadow: none
- - height: 120px
- - width: 120px
- icon:
- - background: linear-gradient(145deg, #ccc, #999, #eee) !important
- - -webkit-background-clip: text
- - -webkit-text-fill-color: transparent
- - type: custom:button-card
- show_icon: false
- show_name: false
- styles:
- card:
- - display: none
- card_mod:
- style: |
- ha-card {
- display: flex;
- justify-content: center;
- padding: 0;
- background: none;
- box-shadow: none;
- border: none;
- }
- - type: custom:mod-card
- card:
- type: horizontal-stack
- cards:
- - type: custom:button-card
- icon: mdi:volume-minus
- show_name: false
- tap_action:
- action: call-service
- service: media_player.volume_down
- service_data:
- entity_id: media_player.MasonRokuTV
- styles:
- card:
- - background: none
- - box-shadow: none
- - border: none
- - height: 120px
- - width: 120px
- icon:
- - color: '#662d91'
- - type: custom:button-card
- icon: mdi:volume-off
- show_name: false
- tap_action:
- action: call-service
- service: media_player.volume_mute
- service_data:
- entity_id: media_player.MasonRokuTV
- is_volume_muted: true
- styles:
- card:
- - background: none
- - box-shadow: none
- - border: none
- - height: 120px
- - width: 120px
- icon:
- - color: '#662d91'
- - type: custom:button-card
- icon: mdi:volume-plus
- show_name: false
- tap_action:
- action: call-service
- service: media_player.volume_up
- service_data:
- entity_id: media_player.MasonRokuTV
- styles:
- card:
- - background: none
- - box-shadow: none
- - border: none
- - height: 120px
- - width: 120px
- icon:
- - color: '#662d91'
- card_mod:
- style: |
- ha-card {
- display: flex;
- justify-content: center;
- background: none;
- box-shadow: none;
- border: none;
- margin: 0 auto;
- padding: 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement