Last active
December 1, 2024 15:32
-
-
Save jazzyisj/f90bf1c1c3205d5d2d791f196fc144b1 to your computer and use it in GitHub Desktop.
Play MASS Media - Example Loevelace Card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################################## | |
# MASS Media Launcher - Lovelace Card | |
# Example: https://github.com/jazzyisj/home-assistant-config/blob/master/www/mass/mass_play_media_card.gif | |
# | |
# Requirements: Available on HACS | |
# https://github.com/thomasloven/lovelace-fold-entity-row | |
# https://github.com/thomasloven/lovelace-template-entity-row | |
######################################################################################################## | |
type: entities | |
title: "Play MASS Media" | |
icon: mdi:play-box | |
state_color: true | |
show_header_toggle: false | |
entities: | |
- entity: input_select.mass_media_type | |
name: "Media Type" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: Artist | |
row: | |
entity: select.mass_artist | |
name: "Artist Name" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: Album | |
row: | |
entity: select.mass_album | |
name: "Album Name" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: Track | |
row: | |
entity: select.mass_track | |
name: "Track Name" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: Playlist | |
row: | |
entity: select.mass_playlist | |
name: "Playlist" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: Radio | |
row: | |
entity: select.mass_radio | |
- entity: select.mass_media_player | |
name: "Media Player" | |
- entity: input_number.mass_volume | |
name: "Volume" | |
- type: custom:fold-entity-row | |
head: | |
type: custom:template-entity-row | |
name: "Options" | |
icon: mdi:cog | |
entities: | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: | |
- Track | |
- Album | |
- condition: state | |
entity: input_boolean.mass_radio | |
state: "off" | |
row: | |
entity: select.mass_artist_filter | |
name: "Artist Filter" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: Track | |
- condition: state | |
entity: input_boolean.mass_radio | |
state: "off" | |
row: | |
entity: select.mass_album_filter | |
name: "Album Filter" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: &media_types | |
- Album | |
- Artist | |
- Track | |
- Playlist | |
- condition: state | |
entity: input_boolean.mass_radio | |
state: "off" | |
row: | |
entity: input_select.mass_repeat_mode | |
- entity: input_select.mass_enqueue_mode | |
name: "Enqueue Mode" | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: *media_types | |
- condition: state | |
entity: input_boolean.mass_radio | |
state: "off" | |
row: | |
entity: input_boolean.mass_shuffle | |
- type: conditional | |
conditions: | |
- condition: state | |
entity: input_select.mass_media_type | |
state: *media_types | |
row: | |
entity: input_boolean.mass_radio | |
- entity: button.mass_play_media | |
name: "Play Media" | |
#NOTE places this update media button anywhere it is appropriate in your ui | |
- entity: button.mass_update_media | |
name: "Update Media" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment