My Command line sensor shows:
python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
0.66.0b0
My Command line sensor shows:
python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
0.66.0b0
Yeah, I just got a notification for this - should I hit upgrade, or not?
pip3 install --upgrade homeassistant
stays on 0.65.6.
Ha, bizarre-o - curioser and curioser…
@VDRainer - I just realised we’re using slightly different methods to get the upstream version, but mine is stuck on 67.1 (hence why I’ve realised that there’s a problem, because I was wondering why a new rc hadn’t been released and it turns out I’ve missed two!)
Is yours working? Or can anyone tell me the correct sensor config to always get the latest version as the result?
Cheers.
Hi @anon43302295, i’ve realized that there’s a new RC when i saw an issue on github that points to 0.68.0b0.
Looking also for a way to get notified if there’s a new release available.
It worked for the first RC’s.
The question is, do the devs miss something, or does the command line only point to stable versions.
Yeah, the url used to point to the most recent version, but now seems to point to the most recent stable version.
@balloob - any ideas please?
For reference, my sensor is
sensor:
- platform: rest
resource: https://pypi.python.org/pypi/homeassistant/json
name: HA upstream
value_template: "{{ value_json.info.version }}"
scan_interval: 3600
Which I think is exactly the same as @VDRainer but via rest rather than requests.
Looking at it
Checking the json file returned from https://pypi.python.org/pypi/homeassistant/json the value for the release is actually the latest release version.
To be able to view a beta release your going to need to change the sensor in question.
I’m not that familiar with json so can’t help you with that.
Any idea what’s changed? This used to pick up the most recent version including the rc’s (hence why @VDRainer made this thread because we got the update notification before the official announcement of the new release schedule).
(if I can find out what changed, I might be able to work out the correct url, but atm it’s needle in a haystack)
Looked at the json and saw that 0.68.0b2 is released 10 minutes ago.
But how to automate this?
Maybe a Scrape Sensor to get the last line here and then splitting it out?
Have to go to bed now.
Yeah overdue bed myself, but I think that is a pretty good solution. I’ll have a look when I get 5 minutes tomorrow
OK - unless I’m missing something I don’t think the scrape sensor will work on that page, because the only option is nth-of-class
which counts from the top, so you would need to know how many links there were in the page.
I’ve tried using nth-last-of-class
but I get an error that tells me that nth-of-class
is the only available class.
@fabaff - thoughts?
Got one. Looks crazy, but works.
@anon43302295, let’s test it a few versions.
- platform: command_line
command: python3 -c "import requests; print(requests.get('https://pypi.org/simple/homeassistant').text.split('homeassistant')[-1].split('-')[1].split('.tar')[0])"
I’ll give it a go
A little simpler:
python3 -c "import requests; print(requests.get('https://pypi.org/simple/homeassistant').text.split('homeassistant-')[-1].split('.tar')[0])"
@VDRainer - finally got around to this today and I’m getting an error…
Command failed: python3 -c "import requests; print(requests.get('https://pypi.org/simple/homeassistant').text.split('homeassistant-')[-1].split('.tar')[0])"
Is yours working?
(edit) same with both commands above