Alexa Local Operating a group from Hass.io

I’ve got Node-red working with the Alexa “amazon-echo-hub” and can turn a single light on an off with ease.

In my groups.yaml I have:

  All Lamps:
    name:   All Lamps
    entities:
        #- light.sf_10
        - switch.sf_04
        - switch.sf_03
        - switch.sf_07
       - switch.sf_09

This gives me a nice group that switches all lamps on/off in lovelace just fine.

I’m having trouble with setting up the “api-call-service” node. What should i be inserting in the DATA section for the group? When it’s a single lamp call: {“entity_id”: “light.sf_10”}.

{"entity_id": "group.all_lamps"}

does not work

Domain: group
Service: turn_on
Entity_id: group.all_lamps

Just use the call_service node and not the API node.

Sorry where would i find the call_service node?

That’s the one. :slight_smile: Plug in what I posted above and it should work fine. If you want to adjust brightness or transition, those would go in the Data field (as JSON).

:slight_smile: Thats the one i was trying…

Each time i call it i get a api error…

More investigation tomorrow. Thanks for the help to date.

After some digging the simple group switching with Alexa can be achieved setting:

domain: homeassistant
Service: Toggle

Node Red Flow:

[{"id":"119b8319.9276ad","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"6b42b5fd.39bbcc","type":"amazon-echo-hub","z":"119b8319.9276ad","port":"80","processinput":0,"x":55,"y":40,"wires":[["c92fa7a6.d4dd38"]],"l":false},{"id":"c92fa7a6.d4dd38","type":"amazon-echo-device","z":"119b8319.9276ad","name":"Lamps","topic":"","x":190,"y":40,"wires":[["37f82f9.229a0d"]]},{"id":"37f82f9.229a0d","type":"api-call-service","z":"119b8319.9276ad","name":"Toggle All Lights","server":"babfc2d7.0ceb7","version":1,"debugenabled":true,"service_domain":"homeassistant","service":"toggle","entityId":"group.all_lamps","data":"{\"entity_id\": \"group.all_lamps\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":380,"y":40,"wires":[[]]},{"id":"babfc2d7.0ceb7","type":"server","z":"","name":"HomeAss","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Hope this helps others ,although it’s simple :slight_smile: