Giter Club home page Giter Club logo

mixer-card's Introduction

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

mixer-card's People

Contributors

dependabot[bot] avatar wrodie avatar

Stargazers

 avatar

Watchers

 avatar

mixer-card's Issues

Change text colour for name field

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I'm wanting the ability to change colour. My HA instance is a dark theme, and it's difficult to see the channel names

Describe the solution you'd like

Ability to choose text colour for fader

Describe alternatives you've considered

Haven't considered any alternatives

Additional context

Feel free to say no if this is outside the scope of this project. I've tried changing text colour using external means, but it hasn't been successful, so I figured I might as well ask.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.