Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101645

False sensor latest version report

$
0
0

@Mariusthvdb wrote:

having used

binary_sensor:
  - platform: template
    sensors:
      ha_update_available:
        friendly_name: 'Ha update available'
        value_template: >
          {% set latest = states('sensor.ha_current_version') %}
          {{ latest != 'unavailable' and 
          latest != states('sensor.ha_local_version')
          and 'b' not in latest}}

for ages, with underlying sensors:

  - platform: rest
    name: Ha current version
    resource: https://www.home-assistant.io/version.json
    value_template: >
      {{ value_json.current_version }}
    json_attributes:
#      - current_version
      - release_date
      - release_notes
      - release_notes_path
      - release_title
      - release_description
      - patch_version_notes
      - root_url
      - semantic_version

and


  - platform: version
    name: Ha local version

I now have a positive flag an update is available while I have 103.2 installed and the current version still shows 103.1 (which is of course incorrect)

Not sure if I can do this so let me ask if we need to change the

latest != states('sensor.ha_local_version')

in the template to

latest >= states('sensor.ha_local_version')

it would still give an erroneous outcome if the latest points to in incorrect version, as it does at the moment. It would however be more to the point, and not simply check if the available and installed version are equal or not…

I know we shouldn’t treat strings as numbers but in this case I wouldn’t know how else to proceed, without stripping, splitting and |int’ing the lot…

Posts: 10

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 101645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>