Companion App Latest Version Sensor

Haven’t seen this yet so I thought I’d throw it out there. I’m scraping the latest version of the Home Assistant app on the Google Playstore and comparing it to the current version sensor in the android mobile app to let me know if the apps on our phones need updating. There might be a better way to get the version off github with a rest sensor or something but this works for now.

  - platform: scrape
    name: HA Companion Latest Version
    select: ".htlgb span"
    index: 3

  - platform: template
        friendly_name: Jason Phone App Version
        unique_id: jphone_latest_version
        icon_template: "{{ 'mdi:check-circle' if is_state('binary_sensor.jphone_latest_version','off') else 'mdi:alert-circle' }}"
        device_class: problem
        value_template: "{{ states('sensor.ha_companion_latest_version') != states('sensor.jphone_current_version') }}"
          current: "{{ states('sensor.jphone_current_version') }}"
          latest: "{{ states('sensor.ha_companion_latest_version') }}"


Alternatively there is also the Github sensor:

if you prefer not to scrape :slight_smile:

That would be a super elegant solution if the beta versions we not reported as the latest version. :roll_eyes:


well it is the latest version but the github integration may need to decipher between pre-releases or not