0.66.0b0 on pypi?

Ha, bizarre-o - curioser and curioser…

Probably because it’s a Beta release, and tagged as “Pre-release”

0.66.0.beta0

@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.

1 Like

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.

1 Like

@Landrash - whilst you’re online, do you know?

Looking at it :sleepy:

1 Like

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. :blush:
But how to automate this? :thinking:

Maybe a Scrape Sensor to get the last line here and then splitting it out?
Have to go to bed now.

1 Like

Yeah overdue bed myself, but I think that is a pretty good solution. I’ll have a look when I get 5 minutes tomorrow :+1:

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. :slightly_smiling_face:
@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])"
1 Like

I’ll give it a go :+1:

A little simpler:

python3 -c "import requests; print(requests.get('https://pypi.org/simple/homeassistant').text.split('homeassistant-')[-1].split('.tar')[0])"
1 Like

@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 :confused:

Hmm. My command_line sensor works as expected!
Does the command work in a Terminal?
I think i don’t have to tell you about ha user and venv… :slightly_smiling_face:

You don’t :smile: , just quickly dumped them into the config and when they didn’t work I thought I’d drop you a line in case you’d come across the same and already fixed it.

I’ll have a mess around with it this afternoon :+1:

Just to come back to this (finally! - don’t know why my life is so busy these days!!)

The command worked fine from the command line in the venv, but continually failed within homeassistant. I don’t know why, I never got to the bottom of it. I know I’ve had problems in the past with any commands that have a space in, which seem to work on everyone else’s machine, but not mine :confused:

Anyway, I’ve managed (I think, will need to test for a few versions) to get a scrape sensor working…

  - platform: scrape
    name: HA upstream
    resource: https://pypi.org/project/homeassistant/#history
    select: 'a[href^="/project/homeassistant/0"]' 

It will only work whilst the version numbers start with a zero, and presuming that the release history page doesn’t change format, but it seems to be working at the minute!! Hoping there might be a new and improved update: component in the works where it actually works, and can be specified to track rc if desired.

I live in hope!

1 Like