Hello
I have home assistant core running on raspberry pi and i have connected relay to GPIO output and included into configuration.yaml.
In Home assistant relay switch works fine.
I need for my automation create few functions and control this relay.
I think i need to run API call service to home assistant for this entity but i don’t know home to do it.
I really need to do it into this function. Maybe someone could help me with it?
If there is a switch entity available in ha, just use that entity in a call service node. It is no different than any other switch in ha as far as on/off commands.
That said I believe that as of 2022.2 all, on pi, gpio’s have been depreciated and will need custom components in order to function.
I noticed that there is now a “Raspberry Pi GPIO” repository in HACS, thanks to Shay Levy
1 Like
There is also firmata. This lets you connect an audrino via usb to your pi.
I never liked the idea of using gpio’s on pi, no real reason behind it. I used a uno for quite sometime until I finally moved to esphome.