Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(media-player): show volume next to state when not unavailable/unknown/off #374

Merged
merged 4 commits into from
May 8, 2022

Conversation

madmurl0c
Copy link
Contributor

@madmurl0c madmurl0c commented Apr 21, 2022

Hey there,

this is just a little pull request that would display the current volume level next to the state of a media player.
image

Fixes #352

Please let me know if there's something missing.

@acesyde
Copy link
Contributor

acesyde commented Apr 21, 2022

Hi @madmurl0c,

You can add this function

and the connection to the slider to update the percentage when the user change the volume

@madmurl0c
Copy link
Contributor Author

Hey @acesyde,

thank you very much for your feedback.
Integrating it the way you mentioned would really be much better so I gave it a try.
I took inspiration from the light-card since it was easier for me to understand but as far as I've tested it there weren't any issues but I'd be glad if you could take a look at it :)

@acesyde
Copy link
Contributor

acesyde commented Apr 21, 2022

@madmurl0c that looks good

@madmurl0c
Copy link
Contributor Author

Thanks for taking a look at it

@piitaya piitaya added the enhancement New feature or request label Apr 22, 2022
@apivaral
Copy link

That's perfect!

@piitaya piitaya self-requested a review April 28, 2022 17:35
Copy link
Owner

@piitaya piitaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🙂

@piitaya piitaya merged commit edc6339 into piitaya:main May 8, 2022
ulic75 added a commit to ulic75/lovelace-mushroom that referenced this pull request May 9, 2022
* Update Vietnamese translation (piitaya#448)

* Update vi.json

* Change "Chip" to "chip"

* feat(humidifier): add humidifier support (piitaya#346)

* feat(humidifier): card

* feat(humidifier): improve card

* fix: view name

* fix: humidity live

* fix: MushroomBaseElement

* fix: clean unused dependencies

* fix: hacard

* fix: collapsible controls

* fix: remove buttons control

* fix: remove buttons control

* fix(humidifier): some fixes (piitaya#451)

* fix: remove console.log

* feat(media-player): show volume next to state when not unavailable/unknown/off (piitaya#374)

* Show volume next to state

* Revert "Show volume next to state"

This reverts commit c40e32f.

Undo due to suggestion from @acesyde

* Reworked volume state based on feedback

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* feat(media-player): add option to display volume level (piitaya#452)

* chore: bump deps (piitaya#453)

* 1.8.0

Co-authored-by: redphx <96280+redphx@users.noreply.github.com>
Co-authored-by: Pierre-Emmanuel Mercier <acesyde@gmail.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: madmurl0c <42262826+madmurl0c@users.noreply.github.com>
ulic75 added a commit to ulic75/lovelace-mushroom that referenced this pull request May 12, 2022
* Update Vietnamese translation (piitaya#448)

* Update vi.json

* Change "Chip" to "chip"

* feat(humidifier): add humidifier support (piitaya#346)

* feat(humidifier): card

* feat(humidifier): improve card

* fix: view name

* fix: humidity live

* fix: MushroomBaseElement

* fix: clean unused dependencies

* fix: hacard

* fix: collapsible controls

* fix: remove buttons control

* fix: remove buttons control

* fix(humidifier): some fixes (piitaya#451)

* fix: remove console.log

* feat(media-player): show volume next to state when not unavailable/unknown/off (piitaya#374)

* Show volume next to state

* Revert "Show volume next to state"

This reverts commit c40e32f.

Undo due to suggestion from @acesyde

* Reworked volume state based on feedback

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* feat(media-player): add option to display volume level (piitaya#452)

* chore: bump deps (piitaya#453)

* 1.8.0

* Update README.md

* Update German translation (piitaya#458)

* Update de.json

* Update de.json

* Update de.json

* Update zh-Hant.json (piitaya#455)

* Update alarm card documentation according to piitaya#376 (piitaya#459)

* Allow customizing badge, button, shape, slider sizes (piitaya#464)

* Allow customizing badge, button, shape, slider sizes

* Add --shape-avatar-size

* feat(themes): improve css variables (piitaya#466)

* fix(chip): fix avatar size for chip

* fix(chip): add avatar only support (piitaya#468)

* fix(actions): allow scroll within actions (piitaya#469)

* Fix strict error handling in templates (piitaya#472)

* Update German translation (piitaya#474)

* Update de.json

* Update de.json

* Update de.json

* Update de.json

* 1.8.1

* Update README to reflect recent UI changes in HA 2022.5 (piitaya#470)

* fix(ios): fix button size on ios

* 1.8.2

* Update Italian translation (piitaya#478)

Added humidity control translation
Added show volume translation

* 1.8.3

* update for new css variables

Co-authored-by: redphx <96280+redphx@users.noreply.github.com>
Co-authored-by: Pierre-Emmanuel Mercier <acesyde@gmail.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: madmurl0c <42262826+madmurl0c@users.noreply.github.com>
Co-authored-by: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Co-authored-by: rhuba8324 <53090204+rhuba8324@users.noreply.github.com>
Co-authored-by: Julien Ehrhart <julien.ehrhart@live.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Doryx <81909485+doryxbirb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Media player card - Show volume level instead of "on"
4 participants