Hi, I just got my Google Home 2 days ago and shortly found out about home assistant afterwards. I’ve been playing around with it and decided I wanted to create a voice command to shut off my smart TV. It’s an LG WebOS.
I’ve been able to remotely shut it off using the services part of Home Assistant, but whenever I use IFTTT it never works? I’m using the exact same parameters.
My IF statement is to use Google assistant and say “Turn my TV off” which THEN triggers the Maker applet.
In maker, my URL is http://REDACTED_IP:8123/api/services/media_player/turn_off?api_password=REDACTED
The method is POST
Content type is application/json
Body is {“entity_id” : “media_player.living_room_tv”}
I’m not sure what I’m doing wrong. Any help would be appreciated. Thanks!
Did you try other services on that media_player? like volumne_up or down? see if it works? Your logic looks fine unless there’s something very small that we couldn’t see
I’d try it via any Rest Client like Postman to see if you can do it… if it works there, it should work on IFTTT. I had one that sent a notification to Google Home via HA Rest API like yours.
Alright here’s the sequence of error messages that pop when I try to send it with Postman
INFO:homeassistant.components.http:Serving /api/services/media_player/turn_on to 192.168.0.11 (auth: True) ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "C:\Users\Shane\AppData\Roaming\.homeassistant\deps\aiohttp\web_protocol.py", line 417, in start resp = yield from self._request_handler(request) File "C:\Users\Shane\AppData\Roaming\.homeassistant\deps\aiohttp\web.py", line 289, in _handle resp = yield from handler(request) File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\asyncio\coroutines.py", line 213, in coro res = yield from res File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\asyncio\coroutines.py", line 213, in coro res = yield from res File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\http\ban.py", line 58, in ban_middleware_handler return (yield from handler(request)) File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\http\__init__.py", line 424, in handle result = yield from result File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\site-packages\homeassistant\components\api.py", line 313, in post data = json.loads(body) if body else None File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\json\__init__.py", line 354, in loads return _default_decoder.decode(s) File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Shane\AppData\Local\Programs\Python\Python36-32\lib\json\decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)