That’s a great use of scrape. How do you trigger a notification in automation using this sensor?
- alias: HA New Release Notification
description: ''
trigger:
platform: state
entity_id: sensor.release
action:
service: notify.mobile_app_your_phone
data:
message: Home Assistant version {{ states('sensor.release') }} available”
title: ”Update”
Thanks, got it to work with this code:
alias: New Hassio update notification
description: ''
trigger:
- entity_id: sensor.release
platform: state
condition: []
action:
- data_template:
message: 'Home Assistant {{ states('sensor.release') }} is available.'
service: notify.XXXX
I’m seeing a similar thing today. When I look at the state of my binary_sensor.updater
I see:
release_notes: 'https://www.home-assistant.io/latest-release-notes/'
newest_version: 0.107.7
friendly_name: Updater
But when I view the Supervisor
page, I can see it’s prompting me to upgrade to version 0.108.0
.
So I’m not sure why my binary_sensor.updater
is not showing up-to-date data. I checked my logs and there are no warnings or errors relating to the updater.
Edit: I forced a restart of my HA and it now shows the expected output. Still doesn’t explain my problem, in that I shouldn’t need to restart HA for this function to work properly.
Running 0.108.0 and have the updater:
in my config file. However I don’t see a binary_sensor_updater
in States. Is anyone else having this issue ? BTW I don’t believe it has anything to do with this release and the same has been occurring on previous releases.
Log Details (WARNING)
Source: __main__.py:342
First occurred: 10:05:17 AM (3 occurrences)
Last logged: 10:05:19 AM
* Setup of updater is taking over 10 seconds.
* Setup of group is taking over 10 seconds.
* Setup of input_boolean is taking over 10 seconds.
Thx for the proposed solutions presented in this Thread. I came up with my own variant since I found crawling the homepage a bit much overhead.
Essentially I reimplemented the Updater component using the rest
component, template sensors and a notification.
This is the rest
sensor and two template sensors extracting the version and changelog url:
### Home Assistant Update Sensor
- platform: rest
name: Home Assistant Latest Release
resource: https://updater.home-assistant.io/
json_attributes:
- version
- release-notes
scan_interval: 3600
value_template: '{{ value_json }}'
- platform: template
sensors:
home_assistant_latest_release_version:
value_template: '{{ states.sensor.home_assistant_latest_release.attributes["version"] }}'
home_assistant_latest_release_notes:
value_template: '{{ states.sensor.home_assistant_latest_release.attributes["release-notes"] }}'
And this is a simple automation to send a notification (to telegram in this case):
- alias: 'Automation: Home Assistant update available'
trigger:
- platform: state
entity_id: sensor.home_assistant_latest_release_version
action:
- service: notify.markus_telegram
data_template:
title: Home Assistant Update
message: >
A new update is available: {{ states('sensor.home_assistant_latest_release_version') }}
{{ states('sensor.home_assistant_latest_release_notes') }}
Which looks like this:
You are the life savior! I was getting frustrated every time it dodn’t work. Thank you.
I’m wondering, is the preview showed within the notification? And if so, is it iOS or Android? Unfortunately it doesn’t work for my Android phone, i have only URL in plain text.
I use these with my Android phone…
- platform: rest
name: Home Assistant Latest Release
resource: https://updater.home-assistant.io/
json_attributes:
- version
- release-notes
scan_interval: 3600
value_template: '{{ value_json }}'
- platform: template
sensors:
home_assistant_latest_release_version:
value_template: '{{ states.sensor.home_assistant_latest_release.attributes["version"] }}'
- id: ha_update_available
alias: HA update available
trigger:
- entity_id: sensor.home_assistant_latest_release_version
platform: state
action:
- data:
data:
actions:
- action: URI
title: Release notes
uri: https://github.com/home-assistant/core/releases
message: '{{ states.sensor.home_assistant_latest_release.attributes.version}}
is available'
title: New Home Assistant Release
service: notify.mobile_app_dad_s_phone
Which gives me…
Note: the Release notes link I use takes you to the github listing which just gives the notes directly relevant to the actual release rather than the blog post which you have to wade through to find them.
Did you find a solution? I am facing the same
Logger: homeassistant.setup
Source: /usr/local/lib/python3.9/asyncio/events.py:80
First occurred: 12:40:51 AM (4 occurrences)
Last logged: 12:40:52 AM
Setup of input_boolean is taking over 10 seconds.
Setup of input_number is taking over 10 seconds.
Setup of zone is taking over 10 seconds.
Setup of input_select is taking over 10 seconds.
No never did, I’d actually forgotten about this issue.