curl -X POST -H “x-ha-access: API_PASS” -H “Content-Type: application/json” -d ‘{“entity_id”:“media_player.sonytv”}’ -k https://host:port/api/services/media_player/volume_down
in return I see
Thanks for the script !
I’m a newbie on Home Assistant because I just upgraded from Jeedom.
I synchronized Alexa and Google Home with Home Assistant and I can command with voice Somfy Cover etc etc, works fine ! without script, directly by addon.
But with this addons, I can just control by default switch on/off TV on Google Home. unless there are specific commands to tell Google that I do not know?
So I created one script per channel For example: Mets TF1 (to activate TF1, channel number 1), Mets France 2 (to activate France 2, channel number 2).
Is not it possible natively to tell Google to change the channel directly by taking the name of the channels of your addon in “sourcelist”, without having to create a script by channel?
Also, is there a way to put a number to the volume for example with set_volume? Because currently, it is necessary to press several times on “volumeup” or “volumedown” and thus to say several times to Google, Ok google, lower the volume for example. Which is not practical.
Error while setting up platform braviatv_psk
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/media_player/braviatv_psk.py”, line 72, in setup_platform
[BraviaTVDevice(host, psk, mac, name, amp, android, source_filter)])
File “/config/custom_components/media_player/braviatv_psk.py”, line 81, in init
from braviapsk import sony_bravia_psk
ModuleNotFoundError: No module named ‘braviapsk’
So my PR is not really useful for that as that one sends commands to /sony/IRCC. Both sony_bravia_ha and sony_bravia_psk packages would probably have to be extended to support that.
Yep, fully agree.
Btw did you found any workable solution for volume_set problem. Both Bravia and Bravia-psk plug-ins do dot manage this function correctly
Hi thanks for that
Im not an expert with building *py packages. Can you share me a corected version of braviatv_psk.py or
guide me how I can rebuild fixed lib from local clone of repo pls. ?
Dzieki z góry:)
Edit , manually updated res files
~/homeassistant/lib/python3.6/site-packages/braviarc/braviarc.py
~/homeassistant/lib/python3.6/site-packages/braviapsk/sony_bravia_psk.py
indeed
a) volume_set works
b) volume app slider reflect changes
Thanks !
now I can focus on shell cmds to run kod/addin/incursion/ and integrate this with google home
Thanks.
But in my file braviatv_psk.py from https://github.com/gerard33/home-assistant i don’t find the same line.
If i find similar line, i have line 276 :
def set_volume_level(self, volume):
“”“Set volume level, range 0…1.”""
self._braviarc.set_volume_level(volume)
Can you tell me what to modify on these lines, if it’s good?
thanks in advance
You would have to modify the sony_bravia_psk.py file instead, which is a dependency of braviatv_psk.py.
I’m not sure where you can find it in your installation. For me it’s in /usr/share/hassio/homeassistant/deps/lib/python3.6/site-packages/braviapsk/(I’m running Hassio in docker container).
It would of course be much simpler if @gerard33 would merge the pull request and release new versions
You should find it somewhere unless the file is in a docker container but if you are running RPI with Hassio as your distro then I think files should not be in a container.
Oh thanks all works fine !
And I can control now volume of the TVs by Google Home
For information :
/config/deps/lib/python3.6/site-packages/sony_bravia_psk/sony_bravia_psk.py
/config/deps/lib/python3.6/site-packages/braviapsk/sony_bravia_psk.py
Ok so volume_set works for 2 Sony Android TV without sound bar
But on my main TV with sound bar connect in HDMI Arc, volume_set not changing the sound level.
But Volume_up and volume_down works
does anyone know how to make volume_set work with the soundbar? Or there isn’t really solution. thank you