Help needed -> How to call service in Home assistant, equivalent to node-red

Hello together,

a few days ago I stumbled over n8n and what do I have to say, it works like a charme and the GUI look very nice. But… The main reason I want to use it, is for Home Assistant. I do come from Node-red and there the Integration is better Integrated (e.g. automatic dicovery of areas and entitiys…)

But I want to give a shot … and had no success hopefullly you can help me out.

What does work? I’ve got successfully connected my Home assistant Server.

I’ve got following flow in Node-Red wich does work

And this should do the same, but as it does not show the entitys and other things like Node-red, I have to guess the Input. I tried a lot, n8n says “executed succesfully” but nothing happens.

Please give me some help, as there is nothing in the n8n documentation!

Hi @ptC7H12, welcome to the community!

I am sorry you’re having trouble. I’ll try setting up HA once I have a bit of time and will get back to you if I can find out anything.

From taking a very quick upfront look at what is happening here, n8n simply seems to send a POST request to $homeAsssistantBaseUrl/api/services/<domain>/<service> (which is what Home Assistant suggests in their API docs).

Are you able to reach Home Assistant from n8n in the first place, for example through the HTTP Request node?

Hi,
thank you very much for your help. When I have time I will try this with POST request - I haven’t done this before - but maybe I will get it running. But now it’s easter and holidays, don’t know when I will be able to do it.
Hopefully the “Call service” will do it a little bit easier, more like Node-Red :wink:

Okay I finally managed to get it working.
It’s very simple (when you know how to use ist ;-)), but you’ve got to update the docs a little bit, to avoid confusing.

Here is how to turn on a lamp:

3 Likes

Amazing, thank you so much for confirming! I’ll forward the suggestion to update our docs to the team :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.