I’m trying to set the volume of my TV in a script to a specific level but whatever value I set volume_level to, for example, 0.2 or 0.4, it doesn’t actually set the volume to that level it simply just increments the current volume by one.
I’ve tried it in Developer Tools > Services and it’s the same. I thought the volume_level key set the volume to the level in the value, or am I wrong?
Can you set the volume through the UI,meaning can you control the volume of this device at all or only turn it on/off? Did you use the media_player.volume_set service? I just tested it and it works fine.
An easy way to tell if set works is if you can get the state of your media player volume or if you have a slider when you look at the media player in your UI. If either of those is ‘no, doesn’t exist’ then you can’t use the set service because your hardware is limiting that.
I have a slider (below image). But when I use the slider, regardless of where I move it to it only increments by 1. So, for example, if it’s where it is in the image below and I move it all the way to the right it only increases by a value of 1.
I’ve just tried it on all my TV’s and Sky Q box and they all do the same.
Well, @nickrout it is correct and your supported_features attribute supports volume set. That means that this is specific to your tv. Nothing in the home assistant code looks like it purposely does this including the code that talks directly to the hardware. That means that the API on the hardware side is performing the change. I’d start googling your model number and this issue.
Thanks Petro and Nick. I’ve realised what the issue is here though after some messing about.
The TV plays audio via a HDMI connected speaker and when I disconnect the speaker the TV volume level can be set in HA.
So what I need to figure out now is if I can set the volume on the speaker. It’s a Bluetooth speaker connected via HDMI ARC so isn’t picked up by HA apart from theHDMI ARC port being listed as a source in the TV. Not even sure if it’s possible to set the volume but if anyone more knowledgeable knows I’d be grateful for some assistance.
Thanks Hellis but it’s already set up. On Bravia it’s called Bravia Sync and it is set up between the TV and speaker already as they are both Sony brand.
Same here. The speaker ( Sony Soundstage) is connected via HDMI ARC to the TV and I can control the volume using the TV remote, speaker remote and Sky box remote.