krpn / home-assistant-updates-notification

This is example configuration to get updates notification in a Telegram chat
10 stars 1 forks source link

Valetudo notification? #1

Closed AndyVRD closed 3 years ago

AndyVRD commented 3 years ago

Hi,

First of all thanks allot for this, works perfect! There is a update available for Valetudo but i don't know what it is and i think i don't have installed anything like that in Home assistant. :)

Btw, in the code there is a little typo. Before the ID (-123456789) there is a dash that don't belong there.

krpn commented 3 years ago

@AndyVRD, hi. You are welcome!

  1. Valetudo aims to be a vendor-agnostic abstraction and cloud replacement for vacuum robots which started as a standalone binary on rooted roborock vacuums. You can remove Valetudo entities if you don't use it. You need to drop:
    • secret valetudo_cleaner_host
    • sensor.valetudo_installed_version
    • sensor.valetudo_latest_version
    • binary_sensor.updater_valetudo
    • input_text.valetudo_host
    • Firmware part of notification message
  2. Telegram Chat ID is negative when this chat is a group. I have a family chat which used for some HA notifications. Removed the dash so as not to confuse anyone. Thank you :)
AndyVRD commented 3 years ago

Thanks for your answer. I removed the Valetduo parts any change you can confirm that the code is still fine because i'm not a expert in this and maybe i removed something that needs to stay. :)

https://paste.ubuntu.com/p/FWkNNZSxRJ/

krpn commented 3 years ago

@AndyVRD, yes, your configuration is correct.

AndyVRD commented 3 years ago

Sorry to disturb again but i'm no longer receive the done_message: "✅ No updates available" message. Are you sure that i don't need two {% endif %} at the last line? I now have {% endfor %} {% endif %} at the last line but in your original configuration.yaml it have two after the valetudo message. Thanks again for any help. :)

krpn commented 3 years ago

@AndyVRD,

  1. You deleted two {% if states('binary_sensor.updater_valetudo') == 'on' %} so you don't need two {% endif %} at the last line. It's closing tag.
  2. If you reboot your Home Assistant to apply updates, you won't get done message because alert is not firing just after boot (it's idle, no updates). You will get done message if you don't reboot the system.
AndyVRD commented 3 years ago

Thanls again for the quick reply, now i'm understanding why the done message is not always sending because i rebooted HA.

krpn commented 3 years ago

@AndyVRD, update state doesn't refresh immediately. So it takes some time to resolve alert (up to 10 minutes). If you restart HA immediately, alert won't have enough time to resolve. When HA restarts, It resets all alerts automatically, rechecks all update states and doesn't send anything because there are no updates now.