Error while setting up rpi_gpio platform for switch

I have: Error while setting up rpi_gpio platform for switch.
I cant use any GPIO :frowning:

PS: I dont have hass user. I have only root and pi. HA instalation is on docker i think ?

You have not given much to go on, first read this:
https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371/4
You may then wish to start here, its one possibility:

Good luck

I am not familiar enough with docker compose to answer, hopefully someone who is will jump in here for you. That being said I think you need to add the device to the volume:

  - /home/pi/homeassistant:/config --device=/dev/gpio:/dev/gpio

But I am just guessing, the other way is to privilege the container with

--privileged

Did you read the link @Kdem posted, especially point 11 on how to post code? Please don’t post screenshots of code.

You don’t need to mount a volume, you need to mount a device

try:

device:
  - /dev/gpiomem:/dev/gpiomem

i add this now but this isnt working too :frowning: i try to add this in all configuration

services:

homeassistant:

container_name: home-assistant

image: homeassistant/raspberrypi4-homeassistant:stable

volumes:

  - /home/pi/homeassistant:/config  
  - /home/pi/homeassistant:/config --device=/dev/gpio:/dev/gpio
  - /dev/mem:/dev/mem
  - /dev/gpiomem:/dev/gpiomem

devices:
  - /dev/gpiomem:/dev/gpiomem
  - /dev/mem:/dev/mem

privileged: true

environment:

  - TZ=Europe/Warsaw

restart: always

network_mode: host