Tsar
(Christian)
January 17, 2022, 8:53am
1
Hello,
I have a lot of switches defined like this :
switch:
- platform: command_line
switches:
spots_hallway:
command_on: curl "http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=5&CHA=0&EVT=3"
command_off: curl "http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=5&CHA=1&EVT=3"
friendly_name: "Lichten gang"
These works fine and are showing up in Google Home.
But I also have these rest_commands (f.e. my shutters) :
rest_command:
rolluik_eettafel_op_kort:
url: http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=2&CHA=10&EVT=3
rolluik_eettafel_op_lang:
url: http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=2&CHA=10&EVT=4
rolluik_eettafel_neer_kort:
url: http://192.168.1.3:80/postEvent.html?action=input&STM=0&MOD=1&CHA=10&EVT=3
How can I make these visible in Google Home and how can I give them a friendly name (to use with Google Assistant) ?
I have this in my configuration.yaml :
google_assistant:
project_id: home-assistant-xxxxx
service_account: !include SERVICE_ACCOUNT.json
report_state: true
exposed_domains:
- switch
- light
- camera
- scene
- sensor
- script
- **rest_command**
entity_config:
switch.tv_samsung_6_series_50:
expose: false
Hellis81
(Hellis81)
January 17, 2022, 9:04am
2
I think.
If you make scripts that use the rest commands then it should be visible in GH after synchronising
Tsar
(Christian)
January 17, 2022, 9:46am
3
Ah, OK…
Could you elaborate this with an example please (f.e. a script called ‘rolluik_eettafel_neer_lang’ that I want to call with a friendly name “Rolluik eettafel op”) ?
Hellis81
(Hellis81)
January 17, 2022, 9:54am
4
I get this when I create a script with rest as part of the call service.
Doesn’t your entities show up in the list?
Tsar
(Christian)
January 17, 2022, 10:04am
5
Misunderstanding…the problem is not my script, this is working
alias: rolluik_eettafel_neer_lang
sequence:
- service: script.switch_rolluik
data:
rolluik: eettafel
beweging: neer
druk: lang
mode: single
My question is what I have to put in the config.yaml file to make this visible in Google Home and how to give it the friendly name “Rolluik eettafel neer” (so I can call “Hey Google, rolluik eettafel neer”).
Hellis81
(Hellis81)
January 17, 2022, 10:09am
6
You have already exposed scripts, so nothing.
You need to sync the devices on GH.
Then you need to ask GH to "activate <script name>"
.
Or create a routine in GH that is "activate <script name>"
with a easier command.
Tsar
(Christian)
January 17, 2022, 10:24am
7
Great, it works!
It is a pity that this cannot be specified on the side of Home Assistant…
PS: I can’t mark your post with the Solution tag