ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
267 stars 34 forks source link

Rename function - gets a config check error. #139

Closed psyciknz closed 1 month ago

psyciknz commented 6 months ago

Hi

First of all, let me say that I've been looking for a docker controller for ages.....having come from using ssh command line scripts for controlling docker containers. This is such a good component.

I'm trying to get the rename function working. Here is my config:

monitor_docker:
  - name: Melkor
    containers: 
      - mediadns
      - unifi
      - mosquitto
    rename:
      - mediadns: "MediaDNS"
    monitored_conditions:
      - containers_running
      - containers_total
      - state
      - status

When I check configuration I get: Configuration warnings Invalid config for 'monitor_docker' at configuration.yaml, line 167: expected dict for dictionary value 'monitor_docker->0->rename', got [{'mediadns': 'MediaDNS'}]

As far as I can tell I have it correct, any pointers?

psyciknz commented 6 months ago

Oh got it...

rename:
  mediadns: MediaDNS

not - mediadns: MediaDNS