Skip to content

Group MusicCast Speakers with Home Assistant

License

Notifications You must be signed in to change notification settings

micha91/pymusiccast

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Group MusicCast Speakers with Home Assistant

After waiting a year for pymusiccast to support speakers group I decide to create a custom module, overwriting existing pymusiccast module, using code from this PR (credits @hcoohb).

musiccast group management example

Install

HACS

  • Find it under integrations and select install it.
    ]

Manual

  • Copy entire pymusiccast/custom_components/musiccast_yamaha folder under $HOMEASSISTANT_CONFIG/custom_components/.

Setup

  • At media_server component you have to add the following entry for each media player you want to add
- platform: musiccast_yamaha
  host: `your.speaker.ip.address`
  port: 5009

Using grouping at home assistant as a service

To add a speaker at a group:

action:
  - service: musiccast_yamaha.join
    data:
      entity_id: `THE_CLIENT_SPEAKER`
      master: `THE_MASTER_SPEAKER`

To remove a spearker from group

action:
  - service: musiccast_yamaha.unjoin
    entity_id: `THE_CLIENT_SPEAKER`

Using grouping at home assistant with custom:mini-media-player

To add the group layout at custom:mini-media-player you have to add something like this at your ui-lovelace.yaml:

views:
  - title: Home Assistant
    id: media_player
    icon: mdi:audio-video
    cards:
      - type: entities
        entities:
          - type: custom:mini-media-player
            group: true
            entity: media_player.livingroom
            name: LivingRoom
            toggle_power: false
            artwork: cover
            hide:
              icon: true
              power_state: false
            speaker_group:
              platform: musiccast_yamaha
              expanded: false
              entities:
                - entity_id: media_player.livingroom
                  name: LivingRoom
                - entity_id: media_player.office
                  name: Office
                - entity_id: media_player.bedroom
                  name: BedRoom
                - entity_id: media_player.yard
                  name: Yard
          - type: custom:mini-media-player
            group: true
            name: Office
            hide:
              icon: true
              controls: true
              progress: true
              source: true
              info: true
              power_state: false
            entity: media_player.office
            toggle_power: false
          - type: custom:mini-media-player
            group: true
            name: BedRoom
            hide:
              icon: true
              controls: true
              progress: true
              source: true
              info: true
              power_state: false
            entity: media_player.bedroom
            toggle_power: false
          - type: custom:mini-media-player
            group: true
            name: Yard
            hide:
              icon: true
              controls: true
              progress: true
              source: true
              info: true
              power_state: false
              volume: true
            entity: media_player.yard
            toggle_power: false

You like this project? Be nice!

Buy me a coffee beer! ;-)

Buy me a coffee beer!

License

This project is under the MIT license.

About

Group MusicCast Speakers with Home Assistant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%