homeassistant-ssh icon indicating copy to clipboard operation
homeassistant-ssh copied to clipboard

no sensor value for 'docker info'

Open MiRen76 opened this issue 10 months ago • 0 comments

I never get a sensor info if I try to request the following as commands.

  • docker info -f '{{.ContainersStopped}}'
  • docker info -f '{{.ContainersRunning}}'
  • docker info -f '{{.ContainersPaused}}'
  • docker info -f '{{.Containers}}'

I tried the commands via ssh with the user on the machine directly and it worked.

I added the follwing in the config of the ssh integration:

  • command: docker info -f '{{.ContainersRunning}}' scan_interval: 60 sensors:
    • type: number name: active container key: active container

MiRen76 avatar Mar 29 '24 22:03 MiRen76