Skip to content

Commit

Permalink
Player controls (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
OzGav authored Feb 2, 2025
2 parents ea3644e + eea0b1e commit af264be
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/ha-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ Before the Plugin can be added the HA Integration must be [installed](integratio
- If using the Music Assistant add-on (i.e. HAOS), you wont need any server details, it should auto connect to the local HA instance
- If using the docker version of the MA server, you will be required to enter the URL to your HA instance and then authenticate

## Configuring the Home Assistant Plugin

The Home Assistant Plugin can expose HA entities to MA that can then be mapped to the power, volume or mute functions of the MA player. There are three drop down lists which contain a filtered list of HA entities:

- For power controls, entities that can be turned on/off and have a boolean state will be shown. (i.e. switch, input_boolean and media_player)

- For mute controls, entities that can be turned on/off and have a boolean state will be shown. (i.e. switch, input_boolean and also media_player (where mute state will be mapped))

- For volume controls, entities that can have a numeric value/state will be shown. (i.e. input_number and media_player (where volume_level will be mapped))

When an entity is selected it will then appear as an option in an individual player's player control settings.

## Installation of the Home Assistant Player Provider

Before the Player Provider can be added the Plugin must be installed. The following image shows what a successful installation looks like
Expand Down
10 changes: 10 additions & 0 deletions docs/player-support/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,13 @@ A dot on the line represents a component that changes the signal. The lack of a
Using the icons at the top of the view, the additional filters can be reordered, disabled/enabled or deleted.

![DSP image](../assets/screenshots/dsp.jpg)

## Player Controls

Each player has a number of options available to control the behaviour of the power, volume and mute controls in the MA UI. By default, if a device supports these controls then that native behaviour will be used or if the control is not supported then it will be disabled in the UI (the setting will indicate NONE). It is also possible to manually disable the controls by changing the setting to NONE.

It is possible to map other HA entities to the MA player controls. in order for this to be an option the HA entities need to be first exposed to MA via the settings in the [HA Plugin](../ha-plugin.md/#configuring-the-home-assistant-plugin).

**Power** If a player does not support power but it is desired that the player has an on and off state then a FAKE option is available which will simulate the on/off functionality.

**Mute** There is a FAKE option that will set the volume to zero and restore it when mute and unmute is commanded.

0 comments on commit af264be

Please sign in to comment.