wrodie / mixer-card

Mixer card for Home Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mixer-card

A Lovelace Audio Mixer card for Home Assistant. Includes the ability to change volume and mute channels.

GitHub Release GitHub Activity License

hacs GitHub Release License Maintenance

Description

This card provides a series of vertical 'faders', each reflecting a 'channel' that allows you to control the audio volume of a number of audio sources.

Each fader has three elements

  • A Fader - giving the current set volume for the channel
  • A Display element - giving the current volume.
  • An Active/Mute button - Allow you to mute the channel

Compatibility

A fader to be controlled is expected to be one of two things:

  1. a number entity with values ranging from 0-1.
  2. a media_player

Options

Configuration is done by using YAML in the card config.

Card Configuration

This configuration applies to all faders in the card

Name Description Default
faders An array of faders - See Fader Card Configuration Required
bordeRadius The border radius for the individual faders 12px
faderWidth The width of each individual fader 150px
faderHeight The height of each individual fader 400px
faderThumbColor The color of the 'thumb' element of the fader (only valid for modern theme) #ddd
faderTrackColor The color of the fader track #ddd
faderActiveColor The color of the active portion of the track when above 0 #22ba00
faderInactiveColor The color of the track when the channel is muted/not-active #f00
faderTheme How should the fader's display. Options are modern/physical modern
haCard Should the card include a <ha-card> element? Boolean true
title Add a title to the card
description Add a description to the card

Fader Card Configuration

This is the configuration for each individual fader

Name Description Default
entity_id The entity_id of the fader entity. This is expected to be a number with values from 0-1. Required
name A friendly name for the channel. If not specified the name of the entity_id will be used Optional
active_entity_id The entity_id of a switch entity that controls the active/mute state of the fader. If not present (for a number element) then the active/mute button will not appear. If entity_id is a media_player this is handled automatically. Optional
value_entity_id The entity_id of a sensor entity that contains the current value of the fader (eg in dB). If not present the value of the fader will be represented as a percentage (%) of the fader. Optional

Example Configuration

    type: custom:custom-mixer-card
    faderWidth: 150px
    faderHeight: 400px
    borderRadius: 12px
    faderThumbColor: '#DDD'
    faderTrackColor: '#DDD'
    faderActiveColor: '#22ba00'
    faderInactiveColor: '#F00'
    faderTheme: modern
    faders:
      - entity_id: number.9f3fea35f92bc3ab474f8f76ad071ab9_bus_11_fader
        name: test name
        value_entity_id: sensor.9f3fea35f92bc3ab474f8f76ad071ab9_bus_11_fader_db
      - entity_id: number.9f3fea35f92bc3ab474f8f76ad071ab9_bus_12_fader
        active_entity_id: switch.9f3fea35f92bc3ab474f8f76ad071ab9_bus_12_on
        value_entity_id: sensor.9f3fea35f92bc3ab474f8f76ad071ab9_bus_12_fader_db

Themes

This card can display the faders in two different options.

  1. modern (Default) This renders the faders as larger 'block' type faders similar to home assistant light faders. This allows easier access for touch etc.

Example of modern theme

  1. physical This makes the faders look more like physical faders

Example of physical theme

Installation

HACS installation:

Go to the hacs store and use the repo url https://github.com/wrodie/mixer-card and add this as a custom repository under settings.

Thanks

I took ideas and some code from - https://github.com/DBuit/media_player-popup-card

About

Mixer card for Home Assistant

License:MIT License


Languages

Language:JavaScript 100.0%