Command failed: /usr/bin/vcgencmd

Hi guys!

I’m running HA in a docker container using the provided docker-compose.yml file on an RPi 4B: Alternative - Home Assistant

The problem occurs using this switch:

  - platform: command_line
        command_on: "/opt/vc/bin/vcgencmd display_power 1"
        command_off: "/opt/vc/bin/vcgencmd display_power 0"
        command_state: "vcgencmd display_power"
        friendly_name: Display Power

When toggling the switch I get this error message:

Logger: homeassistant.components.command_line.switch
Source: components/command_line/
Integration: command_line (documentation, issues)
First occurred: 16:05:20 (1 occurrences)
Last logged: 16:05:20

Command failed: /opt/vc/bin/vcgencmd display_power 1

I also tried /usr/bin/vcgencmd and just vcgencmd but it’s neither working from HA - in the Shell all commands work properly!

Isn’t HA container allowed to run the command vcgencmd or can I fix this somehow?

Thank you for your support!

vcgencmd won’t be available inside the container. You should be able to ssh from the container to the host and run the command that way.
Search the forum, there have been several topics about this already.