{"id":13588809,"url":"https://github.com/kalkih/mini-media-player","last_synced_at":"2025-05-14T03:10:23.161Z","repository":{"id":33288182,"uuid":"148520838","full_name":"kalkih/mini-media-player","owner":"kalkih","description":"Minimalistic media card for Home Assistant Lovelace UI","archived":false,"fork":false,"pushed_at":"2024-10-25T18:47:33.000Z","size":1199,"stargazers_count":1615,"open_issues_count":190,"forks_count":215,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-05-12T13:23:15.410Z","etag":null,"topics":["automation","custom","hacktoberfest","hassio","home-assistant","homeassistant","lovelace","lovelace-ui","media-player","sonos"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kalkih.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.me/kalkih"]}},"created_at":"2018-09-12T18:02:48.000Z","updated_at":"2025-05-08T17:46:34.000Z","dependencies_parsed_at":"2023-12-04T11:31:30.573Z","dependency_job_id":"e876e82e-ac4a-4dbd-be24-b511bb6b00ef","html_url":"https://github.com/kalkih/mini-media-player","commit_stats":{"total_commits":559,"total_committers":74,"mean_commits":7.554054054054054,"dds":"0.22003577817531306","last_synced_commit":"c2ff27ff000be808335b78fe7c7623a0d14c19ca"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkih%2Fmini-media-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkih%2Fmini-media-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkih%2Fmini-media-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkih%2Fmini-media-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalkih","download_url":"https://codeload.github.com/kalkih/mini-media-player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059511,"owners_count":22007769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","custom","hacktoberfest","hassio","home-assistant","homeassistant","lovelace","lovelace-ui","media-player","sonos"],"created_at":"2024-08-01T15:06:57.049Z","updated_at":"2025-05-14T03:10:18.142Z","avatar_url":"https://github.com/kalkih.png","language":"TypeScript","funding_links":["https://www.paypal.me/kalkih"],"categories":["Lovelace User Interface","Install from Source","TypeScript","User Interface","Dashboards"],"sub_categories":["Custom Lovelace UI Cards","Smart Home Automation","Custom Cards"],"readme":"# Mini Media Player\n\n[![](https://img.shields.io/github/release/kalkih/mini-media-player.svg?style=flat-square)](https://github.com/kalkih/mini-media-player/releases/latest)\n[![](https://img.shields.io/travis/com/kalkih/mini-media-player?style=flat-square)](https://travis-ci.org/kalkih/mini-media-player)\n\nA minimalistic yet customizable media player card for [Home Assistant](https://github.com/home-assistant/home-assistant) Lovelace UI.\n\nInspired by [Custom UI: Mini media player](https://community.home-assistant.io/t/custom-ui-mini-media-player/40135) and [custom-lovelace](https://github.com/ciotlosm/custom-lovelace).\n\n![Preview Image](https://user-images.githubusercontent.com/457678/47517460-9282d600-d888-11e8-9705-cf9ec3698c3c.png)\n\n\n## Installation\n\n### HACS (recommended)\n\nThis card is available in [HACS](https://github.com/hacs/integration) (Home Assistant Community Store).\n\n1. Install HACS if you don't have it already\n2. Open HACS in Home Assistant\n3. Go to \"Frontend\" section\n4. Click button with \"+\" icon\n5. Search for \"Mini Media Player\"\n\n### Manual install\n\n#### UI mode\n\n1. Download and copy `mini-media-player-bundle.js` from the [latest release](https://github.com/kalkih/mini-media-player/releases/latest) into your `config/www` directory.\n2. Go to Sidebar -\u003e Settings -\u003e Dashboards -\u003e Menu (top right corner) -\u003e Resources.\n3. Click on `+ ADD RESOURCE`.\n4. Type `/local/mini-media-player-bundle.js?v=1.16.9` below URL.\n5. Choose `JavaScript Module` below Resource Type.\n6. Accept.\n\n#### YAML mode\n\n1. Download and copy `mini-media-player-bundle.js` from the [latest release](https://github.com/kalkih/mini-media-player/releases/latest) into your `config/www` directory.\n2. Add a reference to `mini-media-player-bundle.js` inside your `configuration.yaml` or through the Home Assistant UI from the resource tab.\n\n```yaml\nlovelace:\n  resources:\n    - url: /local/mini-media-player-bundle.js?v=1.16.9\n      type: module\n```\n\n*To update the card to a new version after manual installation, update `mini-media-player-bundle.js` file from [latest release](https://github.com/kalkih/mini-media-player/releases/latest) and edit version of the card in your resources. You may need to empty the browsers cache if you have problems loading the updated card.*\n\n## Using the card\n\n### Options\n\n#### Card options\n| Name | Type | Default | Since | Description |\n|------|------|---------|-------|-------------|\n| type | string | **required** | v0.1 | `custom:mini-media-player`\n| entity | string | **required** | v0.1 | An entity_id from an entity within the `media_player` domain.\n| name | string | optional | v0.6 | Override the entities friendly name.\n| icon | string | optional | v0.1 | Specify a custom icon from any of the available mdi icons.\n| icon_image | string | optional | v1.16.2 | Override icon with an image url\n| tap_action | [action object](#action-object-options) | true | v0.7.0 | Action on click/tap.\n| group | boolean | optional | v0.1 | Removes paddings, background color and box-shadow.\n| hide | object | optional | v1.0.0 | Manage visible UI elements, see [hide object](#hide-object) for available options.\n| artwork | string | default | v0.4 | `cover` to display current artwork in the card background, `full-cover` to display full artwork, `material` for alternate artwork display with dynamic colors, `none` to hide artwork, `full-cover-fit` for full cover without cropping.\n| tts | object | optional | v1.0.0 | Show Text-To-Speech input, see [TTS object](#tts-object) for available options.\n| source | string | optional | v0.7 | Change source select appearance, `icon` for just an icon, `full` for the full source name.\n| sound_mode | string | optional | v1.1.2 | Change sound mode select appearance, `icon` for just an icon, `full` for the full sound mode name.\n| info | string | optional | v1.0.0 | Change how the media information is displayed, `short` to limit media information to one row, `scroll` to scroll overflowing media info.\n| volume_stateless | boolean | false | v0.6 | Swap out the volume slider for volume up \u0026 down buttons.\n| volume_step | number | optional | v1.9.0 | Change the volume step size of the volume buttons and the volume slider (number between 1 - 100)\u003csup\u003e[1](#option_foot1)\u003c/sup\u003e.\n| max_volume | number | optional | v0.8.2 | Specify the max vol limit of the volume slider (number between 1 - 100).\n| min_volume | number | optional | v1.1.2 | Specify the min vol limit of the volume slider (number between 1 - 100).\n| replace_mute | string | optional | v0.9.8 | Replace the mute button, available options are `play_pause` (previously `play`), `stop`, `play_stop`, `next`.\n| jump_amount | number | 10 | v0.14.0 | Configure amount of seconds to skip/rewind for jump buttons.\n| toggle_power | boolean | true | v0.8.9 | Set to `false` to change the power button behaviour to `media_player.turn_on`/`media_player.turn_off`.\n| idle_view | object | optional | v1.0.0 | Display a less cluttered view when idle, See [Idle object](#idle-object) for available options.\n| background | string | optional | v0.8.6 | Background image, specify the image url `\"/local/background-img.png\"` e.g.\n| speaker_group | object | optional | v1.0.0 | Speaker group management/multiroom, see [Speaker group object](#speaker-group-object) for available options.\n| shortcuts | object | optional | v1.0.0 | Media shortcuts in a list or as buttons, see [Shortcut object](#shortcuts-object) for available options.\n| scale | number | optional | v1.5.0 | UI scale modifier, default is `1`.\n\n\u003ca name=\"option_foot1\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e Only supported on entities with `volume_level` attribute.\n\n#### Idle object\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| when_idle | boolean | optional | Render the idle view when player state is `idle`.\n| when_paused | boolean | optional | Render the idle view when player state is `paused`\n| when_standby | boolean | optional | Render the idle view when player state is `standby`\n| after | string | optional | Specify a number (minutes) after which the card renders as idle *(only supported on platforms exposing `media_position_updated_at`)*.\n\n#### TTS object\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| platform | string | **required** | Specify [TTS platform](https://www.home-assistant.io/components/tts/), e.g. `google_translate` or `amazon_polly`, `cloud` for Nabu Casa, `alexa`\u003csup\u003e[1](#tts_foot1)\u003c/sup\u003e for [\"Alexa as Media Player\"](https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639), `ga`\u003csup\u003e[2](#tts_foot2)\u003c/sup\u003e\u003csup\u003e[3](#tts_foot3)\u003c/sup\u003e for use with [Google Assistant Webserver](https://community.home-assistant.io/t/community-hass-io-add-on-google-assistant-webserver-broadcast-messages-without-interrupting-music/37274) or [Assistant Relay](https://github.com/greghesp/assistant-relay), `sonos`\u003csup\u003e[2](#tts_foot2)\u003c/sup\u003e for use with modified [sonos_say script](https://github.com/kalkih/mini-media-player/issues/86#issuecomment-465541825), `webos`\u003csup\u003e[4](#tts_foot4)\u003c/sup\u003e, `service`\u003csup\u003e[5](#tts_foot5)\u003c/sup\u003e.\n| language | string | optional | The output language.\n| entity_id | string/list | optional | The *entity_id* of the desired output entity or a list of *entity_id's*, can also be `all` to broadcast to all entities or `group` to target currently grouped speakers.\n| volume | float | optional | Volume level of tts output (0 - 1), only supported by platform `sonos`.\n| type | string | optional | `tts`, `announce` or `push`, defaults to `tts`, only supported by platform `alexa`, more info [here](https://github.com/custom-components/alexa_media_player/wiki/Configuration%3A-Notification-Component).\n| data | object | optional | Any additional data to pass with the notify command.\n\n\u003ca name=\"tts_foot1\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e Does not support the `language` option.\n\n\u003ca name=\"tts_foot2\"\u003e\u003csup\u003e2\u003c/sup\u003e\u003c/a\u003e Does not support `language` \u0026 `entity_id` options.\n\n\u003ca name=\"tts_foot3\"\u003e\u003csup\u003e3\u003c/sup\u003e\u003c/a\u003e Requires a custom notify service named `ga_broadcast`, see example below.\n\n```yaml\n# configuration.yaml\nnotify:\n  - name: ga_broadcast\n    platform: rest\n    resource: http://[xxx.x.x.xxx]:5000/broadcast_message\n```\n\n\u003ca name=\"tts_foot4\"\u003e\u003csup\u003e4\u003c/sup\u003e\u003c/a\u003e Requires the card entity name to match the notify service name, if they don't match please specify the notify service name in the `entity_id` option.\n\n\u003ca name=\"tts_foot5\"\u003e\u003csup\u003e5\u003c/sup\u003e\u003c/a\u003e Specify `service` \u0026 `service_data` under the `data` option, specify `message_field` to use `message` for the service.\n\n```yaml\ntype: custom:mini-media-player\nentity: media_player.xiaoai_speaker\ntts:\n  platform: service\n  data:\n    service: xiaomi_miot.intelligent_speaker\n    service_data:\n      execute: true\n      silent: true\n    message_field: text\n```\n\n#### Speaker group object\nSee [Speaker group management](#speaker-group-management) for example usage.\n\n**Supported platforms**\n- sonos\n- soundtouch\n- musiccast\n- squeezebox\u003csup\u003e[1](#speaker_foot1)\u003c/sup\u003e\n- bluesound\u003csup\u003e[1](#speaker_foot1)\u003c/sup\u003e\n- snapcast\u003csup\u003e[1](#speaker_foot1)\u003c/sup\u003e\n- linkplay\u003csup\u003e[2](#speaker_foot2)\u003c/sup\u003e\n- media_player\u003csup\u003e[3](#speaker_foot3)\u003c/sup\u003e\n- heos\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| entities | list | **required** | A list containing [speaker entities](#speaker-entity-object) of one of supported platforms, to enable group management of those speakers.\n| platform | string | 'sonos' | Any supported multiroom platform e.g. `sonos`, `soundtouch`, `bluesound`, see **supported platforms** above.\n| sync_volume | boolean | optional | Keep volume Synchronize between grouped speakers.\n| expanded | boolean | optional | Make the speaker group list expanded by default.\n| show_group_count | boolean | true | Have the number of grouped speakers displayed (if any) in the card name.\n| icon | string | optional | Override default group button icon *(any mdi icon)*.\n| group_mgmt_entity | string | optional | Override the player entity for the group management (Useful if you use a universal media_player as your entity but still want to use the grouping feature)\n| supports_master | boolean | optional | Set to false if your multiroom system does not define one of the media players as master. Defaults to `true` and has not to be set to false for `squeezebox` for backward compatibility.\n\n\u003ca name=\"speaker_foot1\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e All features are not yet supported.\n\n\u003ca name=\"speaker_foot2\"\u003e\u003csup\u003e2\u003c/sup\u003e\u003c/a\u003e Requires [custom component](https://github.com/nagyrobi/home-assistant-custom-components-linkplay#multiroom) for sound devices based on Linkplay chipset, available in HACS.\n\n\u003ca name=\"speaker_foot3\"\u003e\u003csup\u003e3\u003c/sup\u003e\u003c/a\u003e HomeAssistant added join/unjoin services to the media_player. Future official integrations will implement these services (which are slightly different from the ones, which are already supported by this card) instead of implementing them in their own domain.\n\n#### Speaker entity object\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| entity_id | string | **required** | The *entity_id* for the speaker entity.\n| name | string | **required** | A display name.\n| volume_offset | number | optional | Volume offset *(0-100)* when used with `sync_volume`.\n\n#### Shortcuts object\nSee [card with media shortcuts](#card-with-media-shortcuts) for example usage.\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| list | list | optional | A list of [shortcut items](#shortcut-item-object) to be presented as a list, see shortcut item object.\n| buttons | list | optional | A list of [shortcut items](#shortcut-item-object) to be presented as buttons.\n| hide_when_off | boolean | false | Hide the shortcuts while the entity is off.\n| columns | integer (1-6) | 2 | Specify the max number of buttons per row.\n| column_height | number | optional | Specify the column height in pixels.\n| label | string | `shortcuts...` | Specify a custom default label for the shortcut dropdown.\n| attribute | string | optional | Specify any attribute exposed by the media player entity. The attribute value (if exists) is compared with shortcut `id`'s to distinguish selected/active shortcut\u003csup\u003e[1](#shortcuts_foot1)\u003c/sup\u003e.\n| align_text | string | optional | Specify alignment of button icon/text `left`, `right`, `center`.\n\n\u003ca name=\"shortcuts_foot1\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e Examples, `source` for active source or `sound_mode` for active sound mode.\n\n#### Shortcut item object\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| name | string | optional | A display name.\n| icon | string | optional | A display icon *(any mdi icon)*.\n| image | string | optional | A display image.\n| cover | string | optional | A cover image (only supported for button shortcuts).\n| type | string | **required** | Type of shortcut. A media type: `music`, `tvshow`, `video`, `episode`, `channel`, `playlist` e.g. or an action type: `source`, `sound_mode`, `script` or `service`.\n| id | string | **required** | The media identifier. The format of this is component dependent. For example, you can provide URLs to Sonos \u0026 Cast but only a playlist ID to iTunes \u0026 Spotify. A source/(sound mode) name can also be specified to change source/(sound mode), use together with type `source`/`sound_mode`. If type `script` specify the script name here or `service` specify the `\u003cdomain\u003e.\u003cservice\u003e`.\n| data | list | optional | Extra service payload\u003csup\u003e[1](#shortcut_foot1)\u003c/sup\u003e.\n\n\u003ca name=\"shortcut_foot1\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e Only compatible with `script` \u0026 `service` shortcuts, useful for sending variables to script.\n\n#### Action object options\n| Name | Type | Default | Options | Description |\n|------|:----:|:-------:|:-----------:|-------------|\n| action | string | `more-info` | `more-info` / `navigate` / `call-service`  / `url` / `fire-dom-event` / `none` | Action to perform.\n| entity | string |  | Any entity id | Override default entity of `more-info`, when  `action` is defined as `more-info`.\n| service | string |  | Any service | Service to call (e.g. `media_player.toggle`) when `action` is defined as `call-service`.\n| service_data | object |  | Any service data | Service data to include with the service call (e.g. `entity_id: media_player.office`).\n| navigation_path | string |  | Any path | Path to navigate to (e.g. `/lovelace/0/`) when `action` is defined as `navigate`.\n| url | string |  | Any URL | URL to open when `action` is defined as `url`.\n| new_tab | boolean | `false` | `true` / `false` | Open URL in new tab when `action` is defined as `url`.\n| haptic | string |  | `success`, `warning`, `failure`, `light`, `medium`, `heavy`, `selection` | Haptic feedback for the IOS app.\n\n#### Hide object\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| name | boolean | false | The name.\n| icon | boolean | false | The entity icon.\n| info | boolean | false | The media information.\n| power | boolean | false | The power button.\n| source | boolean | false | The source select.\n| sound_mode | boolean | true | The sound_mode select.\n| group_button | boolean | false | The group button.\n| controls | boolean | false | The media playback controls.\n| prev | boolean | false | The \"previous\" playback control button.\n| next | boolean | false | The \"next\" playback control button.\n| play_pause | boolean | false | The play/pause button in media playback controls.\n| play_stop | boolean | true | The play/stop button in media playback controls.\n| jump | boolean | true | The jump backwards/forwards buttons (entity needs to support progress).\n| volume | boolean | false | The volume controls.\n| volume_level | boolean | true | The current volume level in percentage.\n| mute | boolean | false | The mute button.\n| progress | boolean | false | The progress bar.\n| runtime | boolean | true | The media runtime indicators.\n| runtime_remaining | boolean | true | The media remaining runtime (requires `runtime` option to be visible).\n| artwork_border | boolean | true | The border of the `default` artwork picture.\n| power_state | boolean | true | Dynamic color of the power button to indicate on/off.\n| icon_state | boolean | true | Dynamic color of the entity icon to indicate entity state.\n| shuffle | boolean | true | The shuffle button (only for players with `shuffle_set` support).\n| repeat | boolean | true | The repeat button (only for players with `repeat_set` support).\n| state_label | boolean | false | State labels such as `Unavailable` \u0026 `Idle`.\n\n\n### Theme variables\nThe following variables are available and can be set in your theme to change the appearence of the card.\nCan be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically anything supported by CSS.\n\n| name | Default | Description |\n|------|---------|-------------|\n| mini-media-player-base-color | var(--primary-text-color) \u0026 var(--paper-item-icon-color) | The color of base text \u0026 buttons\n| mini-media-player-accent-color | var(--accent-color) | The accent color of UI elements\n| mini-media-player-icon-color | --mini-media-player-base-color, var(--paper-item-icon-color, #44739e) | The color for icons\n| mini-media-player-button-color | rgba(255,255,255,0.25) | The background color of shortcut and group buttons.\n| mini-media-player-overlay-color | rgba(0,0,0,0.5) | The color of the background overlay\n| mini-media-player-overlay-color-stop | 25% | The gradient stop of the background overlay\n| mini-media-player-overlay-base-color | white | The color of base text, icons \u0026 buttons while artwork cover is present\n| mini-media-player-overlay-accent-color | white | The accent color of UI elements while artwork cover is present\n| mini-media-player-media-cover-info-color | white | Color of the media information text while artwork cover is present\n| mini-media-player-background-opacity | 1 | Opacity of the background\n| mini-media-player-artwork-opacity | 1 | Opacity of cover artwork\n| mini-media-player-progress-height | 6px | Progressbar height\n| mini-media-player-scale | 1 | Scale of the card\n| mini-media-player-name-font-weight | 400 | Font weight of the entity name\n\n\n### Example usage\n\n#### Basic card\n\u003cimg src=\"https://user-images.githubusercontent.com/457678/52081816-771c1b00-259b-11e9-8c1e-cfd93ac3e66d.png\" width=\"500px\" alt=\"Basic card example\" /\u003e\n\n```yaml\ntype: custom:mini-media-player\nentity: media_player.kitchen_speakers\n```\n\n#### Compact card\nSetting either `volume` and/or `controls` to `true` in the `hide` option object will render the player as a single row.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/457678/53042774-569efc80-3487-11e9-8242-03d388d40c34.png\" width=\"500px\" alt=\"Compact card example\" /\u003e\n\n```yaml\ntype: custom:mini-media-player\nentity: media_player.example\nicon: mdi:spotify\nartwork: cover\nhide:\n  volume: true\n  source: true\n  power_state: false\n```\n\n#### Card with media shortcuts\nYou can specify media shortcuts through the `shortcuts` option, either as a list or as buttons or why not both?\n\n\u003cimg src=\"https://user-images.githubusercontent.com/457678/53040712-5e0fd700-3482-11e9-9990-6ca13b871f50.png\" width=\"500px\" alt=\"Card with media shortcuts example\"\u003e\n\n```yaml\n- entity: media_player.spotify\n  type: custom:mini-media-player\n  artwork: cover\n  source: icon\n  hide:\n    volume: true\n  shortcuts:\n    columns: 4 # Max buttons per row\n    buttons:\n      # Start predefined playlist\n      - icon: mdi:cat\n        type: playlist\n        id: spotify:user:XXXXXXX:playlist:37i9dQZF1DZ06evO2O09Hg # Where XXXXXXX is your User ID\n      # Change the source to bathroom\n      - icon: mdi:dog\n        type: source\n        id: Bathroom\n      # Trigger script\n      - icon: mdi:dog\n        type: script\n        id: script.script_name\n      # Trigger custom service\n      - name: Crooners Playlist\n        type: service\n        id: spotcast.start\n        data:\n          entity_id: media_player.googlehome1234\n          uri: spotify:playlist:37i9dQZF1DX9XiAcF7t1s5\n\n      ... # etc.\n```\n**Tip**:\nIf you don't have Sonos, but want just a bit more control over playlists and so, a simple solution is to use the `type: service`-option, to trigger the`spotcast.start`-service.\n\nRemember to add the [required data](https://github.com/fondberg/spotcast#call-the-service), for spotcast to work. Also, kindly note that the [spotcast](https://github.com/fondberg/spotcast) custom component is required, for this to work. It's available in HACS.\n\n#### Grouped cards\nSet the `group` option to `true` when nesting mini media player cards inside other cards that already have margins/paddings.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/457678/52081831-800cec80-259b-11e9-9b35-63b23805c879.png\" width=\"500px\" alt=\"Grouped cards example\" /\u003e\n\n```yaml\ntype: entities\nentities:\n  - type: custom:mini-media-player\n    entity: media_player.multiroom_player\n    group: true\n    source: icon\n    info: short\n    hide:\n      volume: true\n      power: true\n  - type: custom:mini-media-player\n    entity: media_player.kitchen_speakers\n    group: true\n    hide:\n      controls: true\n  - type: custom:mini-media-player\n    entity: media_player.bathroom_speakers\n    group: true\n    hide:\n      controls: true\n  - type: custom:mini-media-player\n    entity: media_player.bedroom_speakers\n    group: true\n    hide:\n      controls: true\n  - type: custom:mini-media-player\n    entity: media_player.patio_speakers\n    group: true\n    hide:\n      controls: true\n```\n\n#### Stacked cards\nBy using vertical and horizontal stacks, you can achieve many different setups.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/457678/52081830-800cec80-259b-11e9-9a77-0e8585c3f71c.png\" width=\"500px\" alt=\"Stacked cards example\" /\u003e\n\n```yaml\n- type: horizontal-stack\n  cards:\n    - entity: media_player.tv_livingroom\n      type: custom:mini-media-player\n      info: short\n      artwork: cover\n      hide:\n        mute: true\n        icon: true\n        power_state: false\n    - entity: media_player.tv_bedroom\n      type: custom:mini-media-player\n      info: short\n      artwork: cover\n      hide:\n        mute: true\n        icon: true\n        power_state: false\n- type: horizontal-stack\n  cards:\n    - entity: media_player.cc_patio\n      type: custom:mini-media-player\n      hide:\n        icon: true\n    - entity: media_player.cc_kitchen\n      type: custom:mini-media-player\n      hide:\n        icon: true\n    - entity: media_player.cc_bath\n      type: custom:mini-media-player\n      hide:\n        icon: true\n```\n\n#### Speaker group management\nSpecify all your speaker entities in a list under the option `speaker_group` -\u003e `entities`. They obviously need to be of the same platform.\n\n* The card does only allow changes to be made to groups where the entity of the card is the coordinator/master speaker.\n* Checking a speakers in the list will make it join the group of the card entity. (*`media_player.sonos_office`* in the example below).\n* Unchecking a speaker in the list will remove it from any group it's a part of.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/457678/52181170-53511300-27ef-11e9-9d54-aa9c84a96168.gif\" width=\"500px\" alt=\"sonos group management example\"\u003e\n\n```yaml\ntype: custom:mini-media-player\nentity: media_player.sonos_office\nhide:\n  power: true\n  icon: true\n  source: true\nspeaker_group:\n  platform: sonos\n  show_group_count: true\n  entities:\n    - entity_id: media_player.sonos_office\n      name: Sonos Office\n    - entity_id: media_player.sonos_livingroom\n      name: Sonos Livingroom\n    - entity_id: media_player.sonos_kitchen\n      name: Sonos Kitchen\n    - entity_id: media_player.sonos_bathroom\n      name: Sonos Bathroom\n    - entity_id: media_player.sonos_bedroom\n      name: Sonos Bedroom\n```\n\nIf you are planning to use the `speaker_group` option in several cards, creating a separate yaml file for the list is highly recommended, this will result in a less cluttered `ui-lovelace.yaml` and also make the list easier to manage and maintain.\nYou then simply reference the file containing the list using `entities: !include filename.yaml` for every occurrence of `entities` in your `ui-lovelace.yaml`.\n\nThis is however only possible when you have lovelace mode set to yaml in your HA configuration, see [Lovelace YAML mode](https://www.home-assistant.io/lovelace/yaml-mode/) for more info.\n\n## Development\n*If you plan to contribute back to this repo, please fork \u0026 create the PR against the [dev](https://github.com/kalkih/mini-media-player/tree/dev) branch.*\n\n**Clone this repository into your `config/www` folder using git.**\n\n ```console\n$ git clone https://github.com/kalkih/mini-media-player.git\n```\n\n**Add a reference to the card in your `ui-lovelace.yaml`.**\n\n```yaml\nresources:\n  - url: /local/mini-media-player/dist/mini-media-player-bundle.js\n    type: module\n```\n\n### Instructions\n\n*Requires `nodejs` \u0026 `npm`*\n\n1. Move into the `mini-media-player` repo, checkout the *dev* branch \u0026 install dependencies.\n```console\n$ cd mini-media-player \u0026\u0026 git checkout dev \u0026\u0026 npm install\n```\n\n2. Make changes to the source\n\n3. Build the source by running\n```console\n$ npm run build\n```\n\n4. Refresh the browser to see changes\n\n    *Make sure cache is cleared or disabled*\n\n5. *(Optional)* Watch the source and automatically rebuild on save\n```console\n$ npm run watch\n```\n\n*The new `mini-media-player-bundle.js` will be build and ready inside `/dist`.*\n\n\n## Getting errors?\nMake sure you have `javascript_version: latest` in your `configuration.yaml` under `frontend:`.\n\nMake sure you have the latest version of `mini-media-player-bundle.js`.\n\nIf you have issues after updating the card, try clearing your browsers cache or restart Home Assistant.\n\nIf you are getting \"Custom element doesn't exist: mini-media-player\" or running older browsers try replacing `type: module` with `type: js` in your resource reference, like below.\n\n```yaml\nresources:\n  - url: ...\n    type: js\n```\n\n## Inspiration\n- [@ciotlosm](https://github.com/ciotlosm) - [custom-lovelace](https://github.com/ciotlosm/custom-lovelace)\n- [@c727](https://github.com/c727) - [Custom UI: Mini media player](https://community.home-assistant.io/t/custom-ui-mini-media-player/40135)\n\n## License\nThis project is under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalkih%2Fmini-media-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalkih%2Fmini-media-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalkih%2Fmini-media-player/lists"}