Help with Function to HA Service Call

I created a function for multiple thermostats to receive alexa commands, and send a service call for thermostat mode and/or temperature, to a service call node.

My issue is that the service call node is giving me an API error saying it’s missing the “service” portion in the payload…cant figure out what is wrong.


You have to set wha you would like to do what the climate entity, like set target temperature.
That action is what you specify in the service field.

im passing it, or so I thought, through the msg.payload via the function node as “service”:“climate.set_hvac_mode”

I do not know if that method is actually possible, but try qtleast to make just set service as set_hvac_mode, since climate is already stated in the domain. It’s just a guess though.

You can leave the call service node completely blank and send everything in the message. I can pass domain service and entity but I haven’t figured out the format for data. The example linked doesn’t work for me.

Hi bigverm23,
try removing the climate domain from the service line, like:

msg.payload = 
    service : "set_hvac_mode",
    data : { 
            entity_id : "climate.downstairs",
            hvac_mode : "heat"
return msg;

Best regard, Dirk