If entity/sensor is not equal to other entity/sensor, create sensor status

Is it possible to check of one sensor state is not the same as an other sensor state?
Example:

If 

entity: sensor.home_assistant_operating_system_newest_version 

Is not the same version as:

entity: sensor.home_assistant_operating_system_version

Sensor.update_availible = on

Hey Rick,

here’s an example using a template sensor:

- platform: template
  sensors:
    update_available:
      friendly_name: "Update Available"
      value_template: >-
        {% if states.sensor.installed_version.state != states.sensor.available_version.state %}
        Update Available
        {% else %}
        No Update Available
        {% endif %}

You may tweak it to your liking.

1 Like

The version component already has a binary_sensor for that:

1 Like

Thank you, i tried using it in my current update template, but it does not seem to work.

sensor:
  name: "System Update Status"
  icon: "mdi:update"
  state: >
    {% if is_state('binary_sensor.appdaemon_4_update_available', 'off') and 
    is_state('binary_sensor.check_home_assistant_configuration_update_available', 'off') and 
    is_state('binary_sensor.home_assistant_operating_system_update_available', 'off') and
    is_state('binary_sensor.log_viewer_update_available', 'off') and
    is_state('binary_sensor.mariadb_update_available', 'off') and
    is_state('binary_sensor.samba_share_update_available', 'off') and
    is_state('binary_sensor.studio_code_server_update_available', 'off') and
    is_state('binary_sensor.terminal_ssh_update_available', 'off') and
    is_state('binary_sensor.z_wave_js_to_mqtt_update_available', 'off') and
    is_state('binary_sensor.home_assistant_operating_system_update_available', 'off') and
    is_state('sensor.installed_version.state != states.sensor.available_version.state') and
    is_state('sensor.hacs', '0') %}
      No Updates
    {% else %}
      Update Available
    {% endif %}

Thanks, the sensor was gone after the latest updates.
Reinstalling the “Versions” brought it back now.