oxhey
(Stefan Lazic)
July 17, 2017, 7:36pm
1
I have IFTTT setup with this:
Google Assistant Say - “set tv volume to #”
Maker Webhook URL - http://IP/api/services/script/tv{{NumberField} }?api_password=MYPASSWORD
Body - { “script”: “tv{{NumberField}}” }
I am stuck with the script part.
I dont know how I would actually change the volume level.
For example tv1 should set volume_level on the tv to 0.1
Where would I put that line telling it to set the level to 0.1?
script:
tv1:
sequence:
- service: media_player.volume_set
data_template:
entity_id: media_player.tv
cgtobi
(Tobi)
July 17, 2017, 8:08pm
2
It would be something like
action:
- service: media_player.volume_set
data_template:
entity_id: media_player.tv
volume_level: 0.1
1 Like
oxhey
(Stefan Lazic)
July 17, 2017, 8:09pm
3
So like this? and just have the the tv1 and 0.1 change with the volume level?
tv1:
action:
service: media_player.volume_set
data_template:
entity_id: media_player.tv
volume_level: 0.1
cgtobi
(Tobi)
July 17, 2017, 8:13pm
4
Please check how to format your code correctly. Makes it easier to read.
Try something like this:
tv1:
sequence:
- service: media_player.volume_set
entity_id: media_player.tv
volume_level: 0.1
oxhey
(Stefan Lazic)
July 17, 2017, 8:18pm
5
Failed config
General Errors:
- Component not found: tv1
- Setup failed for tv1: Component not found.
oxhey
(Stefan Lazic)
July 17, 2017, 9:14pm
6
I have removed the errors and have the code below, but nothing happens when i trigger IFTTT:
# Volume Script
script:
tv1:
sequence:
- service: media_player.volume_set
data:
entity_id: media_player.tv
volume_level: 0.01
cgtobi
(Tobi)
July 17, 2017, 9:55pm
7
I don’t know anything about IFTTT integration but did you try the script itself inside HASS?
cgtobi
(Tobi)
July 18, 2017, 5:05am
9
In GUI there should be a representation of your script. You simply press ACTIVATE .
Example:
Newlance
(Evan Lawrence)
August 31, 2018, 5:15pm
10
I did something similar to this last night.
I created a template light (which I can then import to Alexa and google assistant)
In the script I had to convert the light’s base 255 value to the audio component’s 0-1.
It was really simple after that.
“Alexa, TV 50%” sets the volume to 35 (max volume is 70. who uses max 70?!)
madrian
(madrian)
December 8, 2018, 12:30pm
11
I would like to control volume on my set top box with Google Home (I setup via Nabu Casa).
How do I expose volume control to Google Home?