fmartinou / whats-up-docker

What's up Docker ( aka WUD ) gets you notified when a new version of your Docker Container is available.
https://fmartinou.github.io/whats-up-docker
MIT License
983 stars 32 forks source link

Template Error in Home Assistant #307

Open dd310 opened 1 year ago

dd310 commented 1 year ago

Hi

I noticed that, after configuring WUD with MQTT and Home Assistant, the following warning appears in the logs:

Logger: homeassistant.helpers.template
Source: helpers/template.py:735
First occurred: 16:00:17 (2 occurrences)
Last logged: 16:00:26

Template variable warning: 'dict object' has no attribute 'result_tag' when rendering '{% if value_json.update_kind_kind == "digest" %}{{ value_json.result_digest[:15] }}{% else %}{{ value_json.result_tag }}{% endif %}'

Any ideas on how to resolve? Thanks

a-neagoe commented 1 year ago

if you look at the code it looks like the else from the conditionals should extract some tag, store it in a dict and render it with the template.py (flask proably) and the tag is probably not there . I would check very carefully the tags/labels configured for your containers.

dd310 commented 1 year ago

I tried adding the labels wud.tag.include: "latest" and wud.watch.digest: "true" to every container, but the issue is still there. I wouldn't know what else I could try.

This is an example of how I configured the containers: Screenshot_20230804_101159_Chrome.jpg

fenty17 commented 1 year ago

@dd310 - are you using custom icons? (Si, fas etc.). I was trying to do this but they've never appeared correctly in Home Assistant so just left it. All my labels are like this:

    labels:
      - wud.display.name=iCloudPD
      - wud.display.icon=si:icloud
dd310 commented 1 year ago

@dd310 - are you using custom icons? (Si, fas etc.). I was trying to do this but they've never appeared correctly in Home Assistant so just left it. All my labels are like this:

    labels:
      - wud.display.name=iCloudPD
      - wud.display.icon=si:icloud

No, I only use the display.name tag, never tried the other one.

fmartinou commented 1 year ago

Hi @dd310 ,

Can you inspect the wud mqtt topics to see how looks like the MQTT messages ? (wud/container/...)

dd310 commented 1 year ago

Screenshot_20230804_182616_Home Assistant.jpg

I hope the screenshot is readable. This is just one container, if you need more, just ask 👍

dd310 commented 1 year ago

Checking the "received" time, this message has probably something to do with the error:

Screenshot_20230804_183742_Home Assistant.jpg

aheath70 commented 1 year ago

Also got this issue. Also running WUD. I don't run any labels as I have just started using WUD and haven't quite got my head around it yet. I just have it watching all containers on all my docker instances.

SNoof85 commented 6 months ago

FYI I had this issue too.

Working solution here :

I has some old containers that were still in HA as unaivailable and in MQTT... Maybe that cleanup did the trick :)

rodrigosiviero commented 5 months ago

FYI I had this issue too.

Working solution here :

  • delete MQTT devices of WUD in HA
  • Delete all MQTT messages from WUD from Mosqitto
  • Rescan for updates in WUD
  • Enjoy !

I has some old containers that were still in HA as unaivailable and in MQTT... Maybe that cleanup did the trick :)

Tried this, no luck. Still being flooded by the errors.

msaphoto06 commented 4 months ago

same problem