ESPhome calling service in Home Assistant

First led strip is working great but the second one is not. As you can see i’m calling a second led strip which is not on the same esp. What am i doing wrong here?

Code can be found here: https://pastebin.com/wUuyVP1G

Have you tried calling this service in home assistant directly? What happens? Do you have any errors in the logs of the three devices ( two esps and ha) when you run it?

Works fine if calling service in HA

No errors anywhere to be found, esp debug logs don’t even show that service call being made…

I want to avoid wiring another PIR to the second esp because it’s not needed :neutral_face:

I think brightness in the home assistant service must be an integer. Also if you want it to be in percentage there is another field you need to use, otherwise the range is from 1 to 255.

See https://www.home-assistant.io/integrations/light/#service-lightturn_on

You could also consider creating a local esphome service for node 2 and then call that using a home assistant service. Then you nearly bypass ha completely. It is only used to relay the service call itself. This is what I would do. This would allow you to nearly specify everything in esphome terms.

See https://esphome.io/components/api.html#user-defined-services.

Ok, will try that. Thanks