def check_newest_version(hass, huuid):
 result = get_newest_version(huuid)
 if (result is None):
  return
 (newest, releasenotes) = result
 if ((newest is None) or ('dev' in CURRENT_VERSION)):
  return
 if (StrictVersion(newest) > StrictVersion(CURRENT_VERSION)):
  _LOGGER.info('The latest available version is %s', newest)
  hass.states.set(ENTITY_ID, newest, {ATTR_FRIENDLY_NAME: 'Update Available', ATTR_RELEASE_NOTES: releasenotes})
 elif (StrictVersion(newest) == StrictVersion(CURRENT_VERSION)):
  _LOGGER.info('You are on the latest version (%s) of Home Assistant', newest)

def check_newest_version ( hass , huuid ) : result = get_newest_version ( huuid ) if ( result is None ) : return ( newest , releasenotes ) = result if ( ( newest is None ) or ( 'dev' in CURRENT_VERSION ) ) : return if ( StrictVersion ( newest ) > StrictVersion ( CURRENT_VERSION ) ) : _LOGGER . info ( 'The latest available version is %s' , newest ) hass . states . set ( ENTITY_ID , newest , { ATTR_FRIENDLY_NAME : 'Update Available' , ATTR_RELEASE_NOTES : releasenotes } ) elif ( StrictVersion ( newest ) == StrictVersion ( CURRENT_VERSION ) ) : _LOGGER . info ( 'You are on the latest version (%s) of Home Assistant' , newest )
check if a new version is available and report if one is .