Trying to create a volume slider with the mushroom theme and I can’t seem to figure it out. 2nd screenshot has it in the 1,000’s and obviosuly want it to be 0 - 100
Using the Roku Intergration, custom slider button card, media player card and mushroom card
What does this entity ^^^ show as its state in dev tools? Looks like you expect the state of that entity to be a decimal between 0.0 - 1.0 (basically, a percentage of max?) I suspect that’s either not what you actually have there or your math is incorrect where you are doing your multiplication. Open it in dev-tools and check and it’ll tell you if you have a problem in your secondary attribute template or the entity itself.
The state did say 66% when I checked it. So I changed the {% set vol = states(entity) | float * 100 %} to {% set vol = states(entity) | float * 1 %} and that looks correct as far as 1 - 100 volume. (see screenshot above)
I think my main question is while the configuration above looks correct is what am I missing to link the remote volume with that input_number.living_room_sound_test? Or should I approach the configuration a different way for more reliable success.
Yeah now that I understand what you’re trying to do… You’re going to have trouble acting on that volume real time by referencing an entity then replicating its state -many cards have the ability to target an entity’s attributes directly:
Like the slider-entity-row card
can target the volume-level attribute of my master bedroom soundbar:
THEN style the card as necessary. (Don’t let form define function - make it work first. edit: Yes I know you’re looking for the bar styling in mushroom. I think the ability to target an attribute with the mushroom entity card would be a stellar feature request… My point however is the same - dont go so far trying to make it look good you start working around core functionality, like referencing an attribute…
So I did as you suggest and copied the above YAML, added in my media player but I’m not getting slider control of the volume. It’s just acting as a button and not a slider
source_list:
- Home
- AV
- Apple TV
- DIRECTV STREAM
- Deep Space Collection
- Disney Plus
- ESPN
- FloSports
- HBO Max
- "HDMI\_3"
- "HDMI\_4\_(ARC)"
- Hulu
- Kanopy
- "Live\_TV"
- Netflix
- Paramount Plus
- Peacock TV
- PlayStation 4
- PlayStation 4
- Pluto TV - It's Free TV
- Prime Video
- Roku TV Intro
- SHOWTIME
- Spotify Music
- TLC GO
- The Criterion Channel
- The Roku Channel
- Tubi - Free Movies & TV
- Vimeo
- Vudu Movie & TV Store
- YouTube
- YouTube TV
- adult swim
- discovery+ | Stream TV Shows
- fuboTV Watch Live Sports & TV
app_name: Roku
source: Roku
device_class: tv
icon: mdi:youtube-tv
friendly_name: Living Room TV
supported_features: 151481
Looks like your media_player does not support VOLUME_SET (volume_level) which is used by the volume slider. Looking at the supported_features it does support VOLUME_STEP (up & down) and VOLUME_MUTE though. Unfortunately you will not be able to control the volume of this media player with a slider.
That makes sense. I’m using the Roku Integration for the Living Room TV. I tested it with the Alexa media player and that seemed to work. How would I confirm that the Roku integration doesn’t support ‘VOLUME_SET’
I don’t see anywhere on the roku integration page about volume. Wondering if i have it set-up wrong?